Repository navigation
Add option to lose level-gated tiers when island level drops (#118) - #161
Merged
Merged
Conversation
Adds a lose-tiers-on-level-loss config option (default false). When enabled, generators that were unlocked purely by reaching an island level are locked again if the island level later drops below their required level. - Settings.loseTiersOnLevelLoss (lose-tiers-on-level-loss, default false). - checkGeneratorUnlockStatus now calls revokeLevelLockedGenerators, which removes level-gated tiers from the unlocked and active lists when the island level is below their requirement. Runs on the existing IslandLevelCalculatedEvent -> checkGeneratorUnlockStatus path. - Purchased tiers are always kept, so players never lose generators they actually paid for. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D7NWPeGXmsUJnnX42X24Rd
|
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.



Closes #118
Feature
Restores the pre-2.0.0 behaviour where a generator unlocked by island level is locked again if the island level later drops below its requirement. Off by default, behind a config toggle.
Change
lose-tiers-on-level-loss(Settings.loseTiersOnLevelLoss, default false). Requires the Level addon to be meaningful.checkGeneratorUnlockStatusnow calls a newrevokeLevelLockedGeneratorsafter the existing permission revocation. When the feature is enabled, it removes from the island's unlocked + active lists any generator whoserequiredMinIslandLevelis now above the current island level. This runs on the existingIslandLevelCalculatedEvent → checkGeneratorUnlockStatuspath (seeIslandLevelListener), so it triggers whenever the level is recalculated.Design choice
Purchased tiers are always kept — the revocation skips anything in
purchasedTiers, so players never lose a generator they actually paid for. Only free, level-unlocked tiers are re-locked. (Mirrors how #133 preserves purchases for permission revocation.)Tests
Added to
StoneGeneratorManagerTest:Full suite: 110 tests pass.
🤖 Generated with Claude Code