Skip to content

feat: scrollable chunk map dialog with player/island view modes - #49

Merged
tastybento merged 1 commit into
developfrom
feature/scrollable-chunk-map
Aug 23, 2026
Merged

feat: scrollable chunk map dialog with player/island view modes#49
tastybento merged 1 commit into
developfrom
feature/scrollable-chunk-map

Conversation

@tastybento

Copy link
Copy Markdown
Member

Summary

  • When territory can exceed the 13x13 dialog viewport (protection range > 104), a control row is added with two view-mode buttons:
    • ◎ Island center — viewport on island center, arrow points to player
    • ◆ Player position — viewport on the player's chunk, arrow points to island center
  • The directional arrow shows 8 directions (▲▼◀▶↖↗↙↘) and is clickable to switch views. When the target is visible on-screen, the arrow is replaced by a dot.
  • Small islands that fit in 13x13 behave exactly as before — no control row.
  • Player-centered mode gracefully falls back to island-centered when the player isn't on the island.

Files changed

  • ChunkMap.java — added viewport-center overload to cells(viewDx, viewDz)
  • ChunksDialog.java — view mode enum, control row with mode toggles + directional arrow, viewport shifting
  • en-US.yml — 4 new locale keys for view-mode button tooltips
  • ChunksDialogTest.java — 7 new tests covering scrollable detection, viewport shifting, direction glyphs, fallback behavior

Test plan

  • 750 tests pass (7 new)
  • On test server with protection-range 240: open /ch chunks, verify control row appears, switch between Island/Player views, verify directional arrow
  • On test server with protection-range 168: verify dialog shows without control row (small enough to fit)

🤖 Generated with Claude Code

https://claude.ai/code/session_01QWvvUY9ZZJHxUYm1UyjdwK

When the island's territory can extend beyond the 13x13 viewport
(protection range > 104 blocks), the map dialog now adds a control
row with two view modes:

- Island center (◎): viewport centered on the island center, with a
  directional arrow pointing toward the player's position
- Player center (◆): viewport centered on the player's chunk, with a
  directional arrow pointing back to the island center

The directional arrow shows 8 directions (cardinals + diagonals) and
doubles as a navigation button — clicking it switches to the other
view. When the target is already visible on screen, the arrow is
replaced by a dot. For small islands that fit in 13x13, the dialog
behaves exactly as before with no control row.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QWvvUY9ZZJHxUYm1UyjdwK
@sonarqubecloud

Copy link
Copy Markdown

@tastybento
tastybento merged commit dfdab5c into develop Aug 23, 2026
3 checks passed
@tastybento
tastybento deleted the feature/scrollable-chunk-map branch August 23, 2026 19:55
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.

1 participant