Skip to content

Add a toggleable tile yield overlay - #173

Open
ekininceleme wants to merge 1 commit into
FreeCol:sf-auto-mergefrom
ekininceleme:tile-yield-overlay
Open

ekininceleme wants to merge 1 commit into
FreeCol:sf-auto-mergefrom
ekininceleme:tile-yield-overlay

Conversation

@ekininceleme

@ekininceleme ekininceleme commented Sep 7, 2026

Copy link
Copy Markdown

Players currently need to inspect tiles individually to compare potential production when choosing colony sites. This adds an optional map-wide overlay of goods icons and amounts, toggled through View → Display Tile Yields or Ctrl+Y in both the game and map editor.

The overlay shows alternative potential outputs for a regular colonist using the tile's current resources and improvements. It uses the existing production calculation, excludes specialist/player/colony bonuses, and leaves unexplored tiles blank. Labels scale with map zoom and use translucent backgrounds for readability. The display option defaults to off, is available in Preferences, and supports older saved client options.

Validation

  • Built with Apache Ant 1.10.15 and Java 21 (Java 11 source/target).
  • Full JUnit suite: 442 tests passed.
  • New tests cover unexplored tiles, rendering bounds at 0.5×/1×/2× scale, preservation of the graphics context, and preference migration/persistence.
  • Manually checked the overlay on a loaded save on macOS, including enabling and disabling it with Ctrl+Y.
image image

@ekininceleme
ekininceleme force-pushed the tile-yield-overlay branch 2 times, most recently from 6aa1273 to 532d5cf Compare September 7, 2026 16:17
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