Skip to content
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

Improve tab refresh behavior #1125

Open
wants to merge 2 commits into
base: 1.3.12
Choose a base branch
from

Conversation

yarukishi
Copy link
Contributor

The code to refresh governor actions generally assumes that it is being executed on the tab where the action is made visible. However, Evolve has building and research queues, so these triggers might happen while the GUI is viewing any tab. Update the restrictions so that governor tasks are immediately refreshed even without Preload Tab Content enabled.

The defineGovernor() function now accordingly checks for its own visibility before it redraws the GUI.

Some completely missing governor tab refreshes, such as when adding or removing Slavery or Cannibalism, or when researching certain technologies, have also been added.

Additionally, remove various instances where the resource panel was deleted and redrawn, which seems to be legacy that isn't required anymore. This is especially nice when building Mass Ejectors, because those would redraw the resource sidebar every single time a new one was built, causing that part of the page to flash. The simple action of unlocking crates / containers is good enough to make those resources visible, to add the + buttons for per-resource storage management, and for the associated storage type to appear within the modal. I didn't experimentally confirm that alchemy is the same way.

Containers may be unlocked by any building that grants them, because, unlike crates, containers aren't mandatory to progress in the game. Add a variety of checks for this, so even a user whose first container is provided by a building other than the container port or wharf can get the proper unlocks.

I tested most of the early game stuff that doesn't rely on being in Magic. I didn't specifically test any of the changes in space or the changes related to alchemy. In both of those cases, the code changes generally follow the same format as something that I did test.

The code to refresh governor actions generally assumes that it is being executed on the tab where the action is made visible. However, Evolve has building and research queues, so these triggers might happen while the GUI is viewing any tab. Update the restrictions so that governor tasks are immediately refreshed even without Preload Tab Content enabled.

The defineGovernor() function now accordingly checks for its own visibility before it redraws the GUI.

Some completely missing governor tab refreshes, such as when adding or removing Slavery or Cannibalism, or when researching certain technologies, have also been added.

Additionally, remove various instances where the resource panel was deleted and redrawn, which seems to be legacy that isn't required anymore. The simple action of unlocking crates / containers is good enough to make those resources visible, to add the + buttons for per-resource storage management, and for the associated storage type to appear within the modal.

Containers may be unlocked by any building that grants them, because, unlike crates, containers aren't mandatory to progress in the game. Add a variety of checks for this, so even a user whose first container is provided by a building other than the container port or wharf can get the proper unlocks.
@yarukishi
Copy link
Contributor Author

Additional commit 6035efd is to address another user reported bug, where the research queue does not appear after researching Personal Assistant. This is another case where the condition was only checking for tabLoad, without considering the current tab selection for single tab rendering mode.

Discord link: https://discord.com/channels/586926974585274373/586926975185321985/1236215371997122610

I didn't specifically test this fix before pushing the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant