Application,GameData: add support for hidden armours.
This commit is contained in:
parent
30e6ee4018
commit
1aa301c316
2 changed files with 22 additions and 7 deletions
|
@ -96,13 +96,27 @@ Application::drawArmour() {
|
|||
}
|
||||
if(ImGui::BeginPopup("##ArmourPartPopup")) {
|
||||
if(ImGui::BeginListBox("##ChangePart")) {
|
||||
for(auto& set : GameData::armour_sets) {
|
||||
if(part.slot != GameObjects::ArmourPart::Slot::Neck || set.second.neck_compatible) {
|
||||
if(ImGui::Selectable(set.second.name.data(), set.first == part.id,
|
||||
ImGuiSelectableFlags_SpanAvailWidth))
|
||||
{
|
||||
part.id = set.first;
|
||||
}
|
||||
for(const auto& [id, set] : GameData::armour_sets) {
|
||||
if((part.slot == GameObjects::ArmourPart::Slot::Neck && !set.neck_compatible) ||
|
||||
(id == -2 &&
|
||||
!(part.slot == GameObjects::ArmourPart::Slot::LeftFrontSkirt ||
|
||||
part.slot == GameObjects::ArmourPart::Slot::RightFrontSkirt ||
|
||||
part.slot == GameObjects::ArmourPart::Slot::LeftSideSkirt ||
|
||||
part.slot == GameObjects::ArmourPart::Slot::RightSideSkirt ||
|
||||
part.slot == GameObjects::ArmourPart::Slot::LeftBackSkirt ||
|
||||
part.slot == GameObjects::ArmourPart::Slot::RightBackSkirt ||
|
||||
part.slot == GameObjects::ArmourPart::Slot::LeftAnkle ||
|
||||
part.slot == GameObjects::ArmourPart::Slot::RightAnkle)
|
||||
)
|
||||
)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if(ImGui::Selectable(set.name.data(), id == part.id,
|
||||
ImGuiSelectableFlags_SpanAvailWidth))
|
||||
{
|
||||
part.id = id;
|
||||
}
|
||||
}
|
||||
ImGui::EndListBox();
|
||||
|
|
|
@ -33,6 +33,7 @@ struct ArmourSet {
|
|||
};
|
||||
|
||||
static const std::map<std::int32_t, ArmourSet> armour_sets {
|
||||
{-2, {"<hidden>"_s, false}},
|
||||
{-1, {"<unequipped>"_s, true}},
|
||||
{0, {"Vanguard"_s, true}},
|
||||
{1, {"Assault Mk.I"_s, true}},
|
||||
|
|
Loading…
Reference in a new issue