tracker: sticky selection and Ctrl+Home walk-to; walltones: conventional volume

Tracker selection now survives a rescan. The scan is rebuilt every turn and
both lists are distance-sorted, so holding a bare index meant one step by the
player silently re-pointed the selection at a different rat. The tracker now
remembers identity instead -- the actor table for creatures, coordinates for
tiles -- and re-derives the indices in reanchor() after each rescan. Selection
is dropped only when the thing genuinely stops being reported (out of FoV,
killed, picked up), and the existing clamp then falls back to the nearest.

Ctrl+Home walks to the selection, reusing the exact shape of the game's own
click-to-path in ingame.mousepressed: calculatePathFromPlayer, then either
bufferInput or playerInput for a one-step path. Interruptions and threatened-
player truncation therefore behave the way a mouse click does. Most things
worth tracking stand on impassable tiles, which calculatePathFromPlayer refuses
outright, so we fall back to the cheapest of the 8 neighbours and say "next to"
rather than "to". Guarded on states.getCurrent() == "ingame": elsewhere the
input buffer belongs to another state and feeding it moves would be a bug.

Wall tones now follow the usual proximity convention -- a near wall is loud,
one out at radius is quiet. It was inverted, which read backwards in play since
a nearby wall is the more urgent fact. config.louderWhenFurther still flips it.

Testbed covers both: selection identity across a forced rescan, and that
Ctrl+Home moves the player without breaking out of the map.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Accessibility Mod
2026-08-02 01:00:25 +02:00
co-authored by Claude Opus 5
parent 6380998376
commit 81a209b600
5 changed files with 293 additions and 21 deletions
+13
View File
@@ -73,6 +73,7 @@ Finds everything you have seen, sorted by distance.
| `PageUp` / `PageDown` | Previous / next **kind** of thing in that category |
| `Shift+PageUp` / `Shift+PageDown` | Previous / next **instance** of that kind |
| `Home` | Distance, direction, and number of steps by path |
| `Ctrl+Home` | Walk to it |
Categories: Creatures, Items, Alchemy, Interactables, Exits, Terrain features.
@@ -81,6 +82,18 @@ So `Ctrl+PageDown` to reach "Creatures", `PageDown` to move between rat / beetle
you the walking distance, which indoors is often very different from the
straight-line distance.
`Ctrl+Home` does exactly what left-clicking the tile does with a mouse: it queues
a walk along the game's own path. If the thing itself cannot be stood on — a
creature, a chest, a bed — you walk to the nearest tile beside it instead, and
the announcement says "next to" rather than "to". As with a mouse click, the walk
stops early if something interrupts you, and while an enemy is in view the game
only ever commits one step at a time.
Your selection sticks. The list is rebuilt and re-sorted by distance every turn,
but the tracker follows the thing you picked rather than the slot it was in, so a
rat you are tracking stays selected as it moves around. It is only let go when it
genuinely stops being visible.
The tracker only ever reports things you have actually seen.
### Your character