items: read the details of the focused item
The item grids said which item you were on ("a torch, slot 3") but nothing
about what it was -- no description, no condition, and no "what does this
refine into", which is the whole of alchemy.
The game already composes all of it in one place: item.getPopupMessage()
(modules/item.lua:199) returns the cursor popup's line list, so read that
rather than re-deriving anything from templates.
It also already gates it behind a dwell -- the popup only fades in after
examinationPopupFadeInDuration (0.4s), so a sighted player who arrows past a
slot never sees the details either. Mirror that instead of inventing a
modality: stop on an item for 0.6s and the details speak themselves, queued.
"=" reads them on demand, Shift+= keeps the name line too. ("r" was the
obvious mnemonic but is a game-claimed scancode, and getCommand() dispatches
on scancode ignoring modifiers.)
New generic hook descriptor.details() returning a LIST of blocks, so each is
also pushed into the console history and [ ] \ walk a long description back
afterwards -- the journal page trick. Only _itemgrid.lua implements it so far.
The other half is the hint panel craft/refine/trade draw permanently beside
the grid, which the popup never contains: recipe components, and price, which
appears nowhere else in the game. The three panels share a shape, so one
reader covers them. Affordability survives only as a red colour in the hint
table and decides whether enter does anything, so it is decoded and spoken.
59 testbed checks, 0 failures: a synthetic ivy_leaves item as the version-bump
canary for getPopupMessage, hasUpvalue over every hint-panel local, four
assertions on the pure settleStep, and an end-to-end "=" press. Not yet
exercised against a live item -- the prologue inventory is empty.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
c841bcc68d
commit
a00f327c68
@@ -173,6 +173,38 @@ Common actions include Activate, Wield, Unwield, Wear, Take off, Switch on,
|
||||
Switch off, Drink, Eat, Apply, Read, Open, and Prepare for throwing / Pack away.
|
||||
**Equipping is done from here** — there is no separate equipment screen.
|
||||
|
||||
### Item details (`=`)
|
||||
|
||||
| Key | Action |
|
||||
|---|---|
|
||||
| `=` | Read the full details of the item under the cursor |
|
||||
| `Shift+=` | The same, including the item's name |
|
||||
|
||||
Reading the cursor only tells you *which* item you are on. The details tell you
|
||||
what it is: what kind of thing it is, its condition if it can wear out, its
|
||||
description, and — the useful part for alchemy — **what it turns into**, listed
|
||||
per refinement method:
|
||||
|
||||
```
|
||||
It is a raw material. Some fresh green leaves from ivy. They contain weak
|
||||
poison. Yields: x1 when ground in a mortar. x0.2 when distilled.
|
||||
```
|
||||
|
||||
On the crafting, refining and trading screens the details also read the panel
|
||||
beside the grid, which is where the game keeps the things you most need before
|
||||
committing: a recipe's components and **whether you can afford them**, what a
|
||||
refinement produces and how much of it you already have, and — in a shop — the
|
||||
**price**, which appears nowhere else.
|
||||
|
||||
You do not have to press `=` every time. **Stop on an item for about half a
|
||||
second and the details are read to you automatically**, which is what the game
|
||||
does for a sighted player: its own detail popup only appears after you have
|
||||
hovered a slot for a moment. Arrow through a tab quickly and you hear only the
|
||||
names, exactly as a sighted player sees only the icons.
|
||||
|
||||
Details also go into the message history, so `[` and `]` walk back through a
|
||||
long description a piece at a time and `\` re-reads a line.
|
||||
|
||||
### Your character
|
||||
|
||||
| Key | Action |
|
||||
|
||||
Reference in New Issue
Block a user