loot overlay: speak the contents of visible containers
The tutorial teaches "press s to see the contents of containers", and it was silent. For a sighted player s sets levelWindow.itemsHighlightEnabled, which draws the top item's icon on every loot-bearing tile in FoV. We watch that flag rather than binding s ourselves -- it is game-claimed, and keybindings.getCommand() ignores modifiers -- and speak on its rising edge, so the player's own binding, hold vs toggle mode and the toolbar icon all work. The flag is checked both at end of frame and inside the keypressed wrapper, because in hold mode a quick tap goes up and down within one frame. Reads the whole tile.loot list, not just the icon's top entry, nearest first, with each container pushed to the console history for [ ] review. 71 testbed checks, 0 failures. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
dddd8ed9de
commit
93ef26349a
@@ -87,6 +87,30 @@ yourself is spoken first, and any key that acts in the game clears them.
|
||||
|
||||
Nothing outside your current field of view is ever reported.
|
||||
|
||||
#### Seeing inside containers (the game's own `s`)
|
||||
|
||||
The game's tutorial tells you to press **`s`** to see the contents of containers.
|
||||
For a sighted player that draws the icon of whatever is inside every chest, sack
|
||||
and pile you can see, straight onto the map. Pressing it now **speaks the same
|
||||
thing**, nearest first:
|
||||
|
||||
```
|
||||
A wooden chest, 2 tiles east, A bunch of ivy leaves, 3, A torch.
|
||||
A burlap sack, 5 tiles north-west, Coarse salt
|
||||
```
|
||||
|
||||
or `No loot in view` when there is nothing to find, so you can tell the key
|
||||
worked rather than wondering whether it was dropped.
|
||||
|
||||
The icons can only show one item per container; you get the **whole list**. Each
|
||||
container is also pushed into the message history, so `[`, `]` and `\` walk back
|
||||
through a long list after it has been read out.
|
||||
|
||||
This is your own key — whatever you have `Highlight loot` bound to in the game's
|
||||
controls, and however you have set *"highlight overlays require holding the
|
||||
key"*. Clicking the toolbar icon works too. It also works in examine mode and
|
||||
while aiming. Only containers you can currently see are reported.
|
||||
|
||||
The game's own examine mode (**`x`**) is also fully spoken: the arrow keys move a
|
||||
cursor around the map and each tile is described with its distance and direction
|
||||
from you. Press `f` in examine mode to jump between exits.
|
||||
|
||||
Reference in New Issue
Block a user