Skip to content

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

Interface: ItemDef ​

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

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

Properties ​

actions ​

actions: readonly ItemAction[]

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

What may be done with it.


heal? ​

optional heal?: number

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

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:43

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


name ​

name: string

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

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


price? ​

optional price?: number

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

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:49

How many fit in one slot.


tags ​

tags: readonly string[]

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

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


weapon? ​

optional weapon?: string

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

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).