Reward islands for closing a whole ring of chunks - #22
Merged
Conversation
Claiming has only ever paid out per chunk. Closing a complete square around the centre is the milestone that keeps players expanding evenly rather than running one arm of chunks out to the border, so it now earns something. ChunkManager gains isRingComplete() and completedRings(); the latter counts outward from the centre and stops at the first hole, so a chunk claimed two rings out earns nothing while ring 1 is still gappy. RingCompleteEvent fires once per ring. Unlike ChunkUnlockEvent it is cancellable, so a reward plugin can take the milestone over completely; the ring stays complete either way. Rings are earned once and stay earned — highestRingRewarded is persisted on the island data, so losing levels and re-claiming the same chunks pays nothing. Only island create or reset clears it. Rewards are console commands under chunkblock.rings (once per ring, and once per member), deliberately empty by default; the config comment warns against paying island levels, since levels buy chunks and that makes each ring buy the next one. Trophies, titles and secret phase branches from the issue are left out on purpose: the event and command hooks are what lets that layer live outside the gamemode. Part of #3 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EZEwab2kL4i1FNnBYvSmp
[chunks] is the island's total chunk count, not the ring's, so an island holding chunks outside the closed ring was told it was "a perfect square of 16 chunks" — a number that is not a square at all. Say what is actually true: the ring is closed, and here is the total.
The center chunk drew as an ordinary owned chunk, so a grid of identical squares had nothing to orient by — reading it meant counting rows in from an edge. It now gets its own glyph, and a second one for when the player is standing on it, since that is where the magic block is and where players spend most of their time. The legend gains both. Adds IslandChunksCommandTest, which the map had gone without.
|
This was referenced Aug 10, 2026
Merged
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 the first half of #3 — ring-completion milestones.
Claiming has only ever paid out per chunk. Closing a complete square around the centre is the milestone that keeps players expanding evenly instead of running one arm of chunks out to the border, so it now earns something.
What's in it
ChunkManager.isRingComplete(island, ring)andcompletedRings(island).completedRingscounts outward and stops at the first hole, so a chunk claimed two rings out earns nothing while ring 1 is still gappy. Rings that do not fit inside the protection range never count.RingCompleteEvent— island, ring, chunk count. Cancellable, unlike its two siblings: cancelling suppresses the addon's messages, commands and celebration, but the ring stays complete.highestRingRewardedonOneBlockIslands. Earned once, stays earned — re-locking a ring on level loss and claiming it straight back pays nothing. Only island create/reset clears it.chunkblock.rings, empty by default./ch chunksgains a rings line; newisland_rings_completeplaceholder.⚙️ New config
Both lists default empty, so nothing changes for an existing server until an admin fills them in. The config comment warns against paying island levels as a ring reward: levels buy chunks, so that makes each ring buy the next one — a compounding loop rather than a milestone.
🔡 New locale keys
chunkblock.chunks.ring-complete,.ring-broadcastand.ringsinen-US.yml. Other locales lag as usual.Deliberately not in scope
Trophies, island titles and the secret phase branches also asked for in #3 are the reward layer — the event and the command hooks are precisely what lets that live outside the gamemode. #3 should stay open, or be closed with a note about what shipped.
Tests
642 green (was 632). Five in
ChunkManagerTest— ring closure, missing corner, outer ring while an inner one has a hole, ring beyond the protection range. Five inLevelListenerTest— fires once, a partial ring fires nothing, no repeat after relock and re-claim, cancellation suppresses the reward, island reset clears the milestones.🤖 Generated with Claude Code
https://claude.ai/code/session_017EZEwab2kL4i1FNnBYvSmp