Skip to content

Add OneBlock block-count requirement for generators (#117)#163

Open
tastybento wants to merge 1 commit into
developfrom
117-oneblock-block-count
Open

Add OneBlock block-count requirement for generators (#117)#163
tastybento wants to merge 1 commit into
developfrom
117-oneblock-block-count

Conversation

@tastybento

Copy link
Copy Markdown
Member

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

  • Data model: GeneratorTierObject.requiredBlockCount (int, @Expose, cloned, 0 = none).
  • Enforcement: checkGeneratorUnlockStatus gains 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 a getAOneBlock(world) helper with the Placeholder: aoneblock_my_island_phase #121 phase check.
  • Display: requirements lore shows a Required Blocks Broken line ([block-count]) with new en-US locale strings.

Tests

  • GeneratorTierObjectTest: requiredBlockCount default/set/get/clone.
  • StoneGeneratorManagerTest (mocking AOneBlock): unlocks when reached; stays locked when not.

Full suite: 118 tests pass.

⚠️ Stacked on #121

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 against develop, 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.

requiredBlockCount is configurable via generator export/import JSON for now; a GUI editor is a follow-up (the edit panel is full).

🤖 Generated with Claude Code

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
@sonarqubecloud

sonarqubecloud Bot commented Jul 5, 2026

Copy link
Copy Markdown

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.

Unlocking next generator level/type after making some phase on OneBlock

1 participant