Compare commits

...

4 commits

Author SHA1 Message Date
918ead0733 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.
2022-04-08 14:33:17 +02:00
42b4974b43 SaveTool: make the weapon part radio buttons match the game. 2022-04-08 14:12:56 +02:00
c35735b2fc SaveTool: fix an issue with the damage type radio buttons. 2022-04-08 14:12:14 +02:00
32a1a6d014 Mass: fix a bug when writing armour parts. 2022-04-08 12:44:30 +02:00
2 changed files with 21 additions and 4 deletions

View file

@ -130,7 +130,10 @@ auto Mass::writeArmourPart(ArmourSlot slot) -> bool {
for(UnsignedInt i = 0; i < armour_array->items.size(); i++) {
part_prop = armour_array->at<GenericStructProperty>(i);
if(slot_str != part_prop->at<StringProperty>("Slot_3_408BA56F4C9605C7E805CF91B642249C"_s)->value) {
if(slot_str == part_prop->at<ByteProperty>("Slot_3_408BA56F4C9605C7E805CF91B642249C"_s)->enumValue) {
break;
}
else {
part_prop = nullptr;
}
}

View file

@ -389,8 +389,8 @@ void SaveTool::drawWeaponEditor(Weapon& weapon) {
weapon.damageType = DamageType::Freeze;
}
ImGui::SameLine();
if(ImGui::RadioButton("Shock##Shock", weapon.damageType == DamageType::Freeze)) {
weapon.damageType = DamageType::Freeze;
if(ImGui::RadioButton("Shock##Shock", weapon.damageType == DamageType::Shock)) {
weapon.damageType = DamageType::Shock;
}
}
@ -429,12 +429,26 @@ void SaveTool::drawWeaponEditor(Weapon& weapon) {
_selectedWeaponPart = 0;
}
ImGui::SameLine();
ImGui::RadioButton(std::to_string(i + 1).c_str(), &_selectedWeaponPart, i);
ImGui::RadioButton(std::to_string(i).c_str(), &_selectedWeaponPart, i);
}
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:");