-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate Facility-Clearing-UI-Indicator fix into CHL #1208
Integrate Facility-Clearing-UI-Indicator fix into CHL #1208
Conversation
Anything else needed on this one? |
Tuple.Data[7].kind = XComLWTVBool; // Label autosize | ||
Tuple.Data[7].b = false; | ||
|
||
`XEVENTMGR.TriggerEvent('FacilityUICustomizeHook', Tuple, Room); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this even has to do with fixing the issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah those are just hooks from the original mod to allow over-riding some facility status labels. Not important at all, will remove.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are integrating the mod, then surely NOT including these hooks could break any mods dependant on them from the original mod ??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're integrating the bugfix, not the mod.
@@ -1339,26 +1375,23 @@ function array<EUIStaffIconType> GetStaffIconData(XComGameState_FacilityXCom Fac | |||
return NewIcons; | |||
} | |||
|
|||
// Issue #1181 - Replace original GetStaffIconDataForClearingSlots function with the same from Facility UI Indicator Fix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment should address the specific issue you're fixing.
NewIcons.AddItem(eUIFG_EngineerEmpty); | ||
if (Room.GetBuildSlot(i).IsSlotFilled()) | ||
NewIcons.AddItem(eUIFG_Engineer); | ||
else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would do it like this:
function array<EUIStaffIconType> GetStaffIconDataForClearingSlots()
{
local int i;
local array<EUIStaffIconType> NewIcons;
local XComGameState_HeadquartersRoom Room;
// Variable for Issue #1181
local XComGameState_StaffSlot BuildSlot;
Room = GetRoom();
// Start Issue #1181
/// HL-Docs: ref:Bugfixes; issue:1181
/// Make facility staff icons correctly display which staff slots are filled.
if (Room != none)
{
for (i = 0; i < Room.BuildSlots.Length; ++i)
{
BuildSlot = Room.GetBuildSlot(i);
if (BuildSlot == none)
continue;
if (BuildSlot.IsSlotFilled())
{
NewIcons.AddItem(eUIFG_Engineer);
}
else
{
NewIcons.AddItem(eUIFG_EngineerEmpty);
}
}
}
// End Issue #1181
//------------------------------------------------
return NewIcons;
}
With indentation, brackets and comments.
Apparently forgot to click the button to finish the review and my messages weren't visible to you. |
Still has unaddressed issues since the last review. |
…acility UI Indicator Fix (i.e. Display correctly which facility slots are empty)
f31b119
to
8235f0e
Compare
Updated & tested. Should be ready for merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks sane, gonna merge after testing.
Tested, works fine. Good work. |
Fixes #1181
Added UIFacilityGrid_FacilityOverlay & replaced appropriate code with that from the Clearing-UI-Indicator fix.
Tested & working as expected - engineer staffed in second excavation slot appears in the second slot on the UI.