It's a very simple mod, requiring only 1 additional line of code. Therefore, I'm not going to share the modified file, you'll need to DIY instead. This also avoids potential conflicts with other mods or future updates.
Installation:
- Open ...\Data\UI\RegionPanel.BSF in a text editor
- Search for "// Click on Order structure button". (Or find the code section shown below.)
- Look for the line "RegionPanel_ShowSubpanel("RegStruc");", and
- Add the line "Region_Structures_Underway_ResetPreChoice(regionID, FALSE)" above. (By above I mean above the line you found in the previous point.)
Explanation:
Build options (prechoices) are reset for the given regionID before the build panel is revealed by the ShowSubpanel routine.
It should look something like this:
Code: Select all
// Click on Order structure button
if (IsUIObject(id, "RegExp_Infra"))
{
if (event == 1) // right click
{
Region_Structures_SetShuffle(regionID, FALSE);
Region_Structures_Underway_Set(regionID, 0);
needsUpdate = REGIONPANEL_UPDATE_ACTION;
}
// hide/show the list of buildable structures
if (GetUIObjectVisible("RegStruc") == TRUE)
{
SetUIObjectVisible("RegStruc", FALSE);
}
else if (MapUI_NumStructureChoices(regionID) > 0)
{
Region_Structures_Underway_ResetPreChoice(regionID, FALSE)
RegionPanel_ShowSubpanel("RegStruc");
needsUpdate = REGIONPANEL_UPDATE_REFRESH;
}
}