Interactable
A thing in the house the player can use. **It marks the spot, it does not behave.** It carries what a thing *is* — a door, a pickup, a note, a switch, a place to hide, the way out — and what it is worth; the `Player` component reads it, decides whether the player may have it, and…
game.systems.Interactable
A thing in the house the player can use. It marks the spot, it does not
behave. It carries what a thing is — a door, a pickup, a note, a switch,
a place to hide, the way out — and what it is worth; the Player component
reads it, decides whether the player may have it, and does it.
So the house never has to know about keys, and the keys never have to know about hinges.
The scene build attaches one to every door leaf and hiding place the house put down, to the front door, and spawns the pickups, notes and the power switch with one already on them. That is what lets a single query find everything the player could be looking at, of every kind.
Fields
| Field | What it is |
|---|---|
kind | "door", "pickup", "note", "switch", "hide" or "exit". |
ref | What it is: a door id, an item id, a clue id, or a switch's id. |
lockedBy | The GameRules.ITEMS id that opens it. Empty means never locked. |
label | What the player reads when they look at it. |
range | How close the player has to be. |
spent, taken | A switch already thrown, a pickup already taken. |
Scoped to this part · feeds back into the world's score.