Files
TheriapolisV3/Theriapolis.Godot/Scenes
Christopher Wiebe b1fc3f244b M7.4b: Top-right cursor-debug panel for play-testing
Mirror of the player-status panel, anchored top-right. Per-frame
sample of GetViewport().GetMousePosition() converted to world coords
via the camera transform; surfaces:

  - World-pixel and world-tile coords under the cursor
  - Biome at that tile
  - Feature flag bitmask (HasRoad / HasRiver / HasRail / IsSettlement
    / IsPoi / IsCoast / RiverAdjacent / RailroadAdjacent)
  - Settlement on the tile via WorldTile.SettlementId lookup —
    name, tier, and economy/governance/pop (or PoI type)
  - Bridge under cursor via point-on-segment hit test against
    world.Bridges (6 px hit radius, ≤ a few dozen bridges so cheap)
  - Tactical block when zoomed in: tactical-tile coords, surface +
    variant, deco, walkability tag (walkable / slow / blocked)
  - NPC under cursor within 12 px hit radius — display name, role
    tag or template id, allegiance, HP

Cached StringBuilder field on PlayScreen (Clear() each frame instead
of new'ing) to keep per-frame GC pressure low. Held keys produce
auto-repeat InputEventKey instances that Godot 4 mono's GC must
collect before engine shutdown; reducing per-frame garbage buys
that collection more headroom and avoided a shutdown-assertion
race observed on the first launch with the panel mounted.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 20:49:44 -07:00
..