Skip to content

five-on-it / packages/sim/src/items / ItemDef

Interface: ItemDef ​

Defined in: packages/sim/src/items.ts:46

An item: what a game names, what a slot holds.

Properties ​

actions ​

actions: readonly ItemAction[]

Defined in: packages/sim/src/items.ts:56

What may be done with it.


armour? ​

optional armour?: number

Defined in: packages/sim/src/items.ts:69

Used, the body armour it puts on (gear.ts: a vest's points; the suit's); it is used up.


gear? ​

optional gear?: GearKind

Defined in: packages/sim/src/items.ts:71

Used, what it is as gear (gear.ts): a gas mask put on or off (kept), the juggernaut suit, an adrenaline shot.


heal? ​

optional heal?: number

Defined in: packages/sim/src/items.ts:58

Used, the hit points it gives back (a first-aid kit); it is used up.


id ​

id: string

Defined in: packages/sim/src/items.ts:48

Its id: lower-case words joined by underscores (first_aid, a mission's office_key).


look? ​

optional look?: "box" | "laptop" | "toolbox" | "bomb" | "briefcase" | "crowbar" | "cash_bag"

Defined in: packages/sim/src/items.ts:67

How it is drawn in the hand and on the ground (HANDHELD_LOOKS): none for a plain item.


name ​

name: string

Defined in: packages/sim/src/items.ts:50

Its name as players read it (First-aid kit).


price? ​

optional price?: number

Defined in: packages/sim/src/items.ts:60

What a shop asks for one ($), unless the game sets its own price; absent: DEFAULT_PRICE.


stack ​

stack: number

Defined in: packages/sim/src/items.ts:54

How many fit in one slot.


tags ​

tags: readonly string[]

Defined in: packages/sim/src/items.ts:52

The tags missions and locks check (key:door:office, keycard:red).


weapon? ​

optional weapon?: string

Defined in: packages/sim/src/items.ts:65

Held in the selected slot, the weapon it arms the character with: a name of the weapon table (pistol, rocket launcher); none for an item that is not a weapon (held, the fists).