Skip to content

five-on-it / packages/sim/src/escape / useEscape

Function: useEscape() ​

useEscape(sim, eid, def, item): object

Defined in: packages/sim/src/escape.ts:379

Uses an item of the escape kit (ItemDef.escape) and says whether it did and whether it is used up: the hook fired (a charge spent), the glider opened, the Cash thrown (the cannon kept), a crew contract signed (a hire event; the contract spent).

Parameters ​

sim ​

SimWorld

eid ​

number

def ​

ItemDef

item ​

number

Returns ​

object

consumed ​

consumed: boolean

used ​

used: boolean