Skip to content

five-on-it / packages/sim/src/interactables

packages/sim/src/interactables ​

The interactables the phone's screens and conversations come from (GAME_DESIGN §5.5, §7.2): terminals (a terminal, a keypad, an ATM, a vending machine) and the people who talk (a character with the contact role). The simulation only knows where they stand and what the interaction key says at them ("Use" or "Hack" at a terminal, "Talk" at a contact); what a terminal's screen shows and what a contact says are the missions' (@foi/missions), which the server runs when the key's interact event reaches it.

A terminal stands on a fixed body of its own, a box that blocks and gives cover like a container's; a mission (a terminal actor) puts one down, the snapshots carry it.

A shop (GAME_DESIGN §5.5, §14) is a terminal too: a counter (or any terminal's look) whose verb is shop, with a stock (SimWorld.stock: items and their prices). The interaction key there opens its panel like a container's, and taking a line out of it buys one, paid in the player's Cash (interaction.ts); the server puts the level's shops and the missions' down.

Type Aliases ​

Variables ​

Functions ​