Skip to content

five-on-it / packages/sim/src/gear / useGear

Function: useGear() ​

useGear(sim, eid, def): object

Defined in: packages/sim/src/gear.ts:179

Uses an item that is gear (GearKind, or armour points) and says whether it did: a vest's armour put on (not when the wearer has all it can wear), the suit put on (its armour and its mask), the mask put on or taken off (the item is kept), a shot taken (its health and its rush). Whatever is used up, the caller takes from the slot (consumed).

Parameters ​

sim ​

SimWorld

eid ​

number

def ​

ItemDef

Returns ​

object

consumed ​

consumed: boolean

used ​

used: boolean