Selection ring under the selected pawn (#143) #155
No reviewers
Labels
No labels
assets
bug
duplicate
enhancement
help wanted
invalid
question
testing
ui
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
liamjd/UntitledColonyBuilder!155
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "143-pawn-selection-ring"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #143. Last open issue in milestone #6 (Selection and inspection).
What changed
PawnViewbuilds aSelectionRingchild in_ready(), lowered to the pawn's feet, andset_highlighted()shows or hides it. Because it's a child, it walks with the pawn and rides terraces the way the capsule does.SelectionHighlightgainsring_material()andmake_ring(). The ring is a flattenedTorusMesh(inner 0.45, outer 0.7, Y squashed to 0.25) inCOLOURat full opacity, unshaded, with no shadow. The mesh and material are shared, but each pawn gets its ownMeshInstance3D, so showing one ring shows no other.is_highlighted()reads a_highlightedflag rather than the ring's visibility, so aset_highlighted()that arrives before_ready()still takes effect.Verification
test/unit/test_pawn_selection_ring.gd(14 tests, committed red ahead of the implementation). Full suite: 991 tests, 990 passing, 1 pending (the existing #85 one).test_selection_picking.gdwere already there onmainand are not from this change.tools/screenshot_pawn_selection.gdframes a pawn at the default zoom (60), selects it, and samples 24 points around its feet. 0% match ring green before selection, 75% after, 0% after deselection, and no other pawn is highlighted. In that run the pawn was standing on grass, which is the worst case for a green ring. It still reads clearly in the close-up PNG and is visible at the default zoom.Caveats
RING_INNER_RADIUSandRING_OUTER_RADIUSif it needs to be bigger.🤖 Generated with Claude Code