From 918ead073321cc323e1897145aff5b2e07bfecc3 Mon Sep 17 00:00:00 2001 From: William JCM Date: Fri, 8 Apr 2022 14:33:17 +0200 Subject: [PATCH] SaveTool: add "unequip" button to shield parts and BL projectiles. It doesn't actually unequip them (the game has no concept of that, unlike accessories), but replaces the ID with one that doesn't exist. --- src/SaveTool/SaveTool_MassViewer_Weapons.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/SaveTool/SaveTool_MassViewer_Weapons.cpp b/src/SaveTool/SaveTool_MassViewer_Weapons.cpp index ed09c37..2646768 100644 --- a/src/SaveTool/SaveTool_MassViewer_Weapons.cpp +++ b/src/SaveTool/SaveTool_MassViewer_Weapons.cpp @@ -435,6 +435,20 @@ void SaveTool::drawWeaponEditor(Weapon& weapon) { auto& part = weapon.parts[_selectedWeaponPart]; ImGui::Text("ID: %i", part.id); + if(weapon.type == WeaponType::Shield || + (weapon.type == WeaponType::BulletLauncher && _selectedWeaponPart != 0)) + { + ImGui::SameLine(); + if(ImGui::SmallButton("Unequip")) { + part.id = -1; + } + if(weapon.type == WeaponType::Shield && _selectedWeaponPart == 0) { + drawTooltip("This will make the whole shield and its accessories invisible."); + } + else { + drawTooltip("This will make accessories invisible as well."); + } + } if(ImGui::BeginChild("##PartDetails", {0.0f, 0.0f}, true)) { ImGui::TextUnformatted("Styles:");