Add OneBlock block-count requirement for generators (#117)#163
Open
tastybento wants to merge 1 commit into
Open
Add OneBlock block-count requirement for generators (#117)#163tastybento wants to merge 1 commit into
tastybento wants to merge 1 commit into
Conversation
Completes the OneBlock progression unlocking from #117 (the phase part is handled by #121): a generator can now require a number of OneBlock blocks to have been broken on the island before it unlocks - a level-free way to gate generators behind digging progress. - GeneratorTierObject.requiredBlockCount (int, @expose, cloned, 0 = none). - checkGeneratorUnlockStatus only unlocks such a generator once the island's OneBlock block count (getOneBlocksIsland(island).getBlockNumber, same value as /ob count) has reached the requirement. Non-AOneBlock worlds never satisfy it. Shares a getAOneBlock helper with the phase check. - Requirements lore shows a "Required Blocks Broken" line ([block-count]) with new en-US locale strings. Configurable via generator export/import for now; admin GUI editor to follow (edit panel is full). 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 #117
Feature
Completes the OneBlock progression-unlocking from #117. The issue proposed two ways to gate a generator on OneBlock progress: by phase (handled by #121) and by blocks broken (
blocks: 5000, this PR). This gives servers a level-free way to unlock generators as players dig through their one-block — the requester's stated goal.Change
GeneratorTierObject.requiredBlockCount(int,@Expose, cloned,0= none).checkGeneratorUnlockStatusgains a block-count filter — a generator unlocks once the island's OneBlock block count (getOneBlocksIsland(island).getBlockNumber(), same value as/ob count) reaches the requirement. Non-AOneBlock worlds never satisfy it. Shares agetAOneBlock(world)helper with the Placeholder: aoneblock_my_island_phase #121 phase check.Required Blocks Brokenline ([block-count]) with new en-US locale strings.Tests
GeneratorTierObjectTest:requiredBlockCountdefault/set/get/clone.StoneGeneratorManagerTest(mocking AOneBlock): unlocks when reached; stays locked when not.Full suite: 118 tests pass.
This branch is based on
121-oneblock-phase-requirement(it reuses that PR's AOneBlock dependency + integration). Since GitHub wouldn't let me target the branch directly, this PR is opened againstdevelop, so its diff currently also shows #121's commits. Please merge #121 first; once it lands, this PR's diff collapses to just the block-count delta. Reviewing the two together is fine too.requiredBlockCountis configurable via generator export/import JSON for now; a GUI editor is a follow-up (the edit panel is full).🤖 Generated with Claude Code