Fix: mode cycling icon shown when all island settings flags are hidden from non-op users#2864
Merged
tastybento merged 2 commits intodevelopfrom Mar 14, 2026
Merged
Conversation
When all island settings options are hidden from non-operator players, the mode cycling icon (IRON_INGOT/GOLD_INGOT/NETHER_BRICK) was incorrectly shown in the settings panel. This caused confusion because clicking it would cycle to a mode with no visible content, making the icon appear to 'disappear'. Changes: - SettingsTab.getTabIcons(): Only show the mode cycling icon when hasVisibleFlags() returns true (i.e., at least one non-hidden flag exists for this tab type). - SettingsTab.getPanelItems(): The while loop that auto-advances past empty modes now also skips modes where all flags are hidden from the non-op user. - TabbedPanel.openPanel(): Call tab.getPanelItems() before setupHeader() so that the tab's internal currentMode state is updated before getTabIcons() reads it. - SettingsTabTest: Updated tests to cover the new mode icon visibility behavior. Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix island settings comparator disappearing issue
Fix: mode cycling icon shown when all island settings flags are hidden from non-op users
Mar 14, 2026
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



When all flags for a settings tab are hidden from non-operator players, the mode cycling icon (BASIC/ADVANCED/EXPERT tier selector) was still rendered, allowing players to cycle into a mode with no visible content — making the icon appear to vanish and leaving the UI in an unrecoverable state across sessions (since the selected mode is persisted per-user).
Changes
SettingsTab.getTabIcons()— Mode cycling icon is now conditional onhasVisibleFlags(). If all flags of this tab's type are hidden from the user, the icon is suppressed entirely.SettingsTab.getPanelItems()— The mode auto-advance loop now also skips modes where all flags are invisible to the user (not just modes with zero flags), using the newisVisibleToUser(Flag)helper:TabbedPanel.openPanel()—tab.getPanelItems()is now called beforesetupHeader(), sogetTabIcons()observes thecurrentModealready advanced by the auto-cycle logic rather than the stale pre-cycle value.SettingsTabTest— Replaced the singletestGetTabIconswith three targeted cases: no flags (empty icons), visible flags (mode icon present at slot 7), and all flags hidden (mode icon absent).Original prompt
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.