Skip to content

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

Function: addItems() ​

addItems(sim, eid, item, count): number

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

Puts count of an item into an entity's slots, onto its stacks of that item first and then into empty slots; returns how many did not fit. A character's ammunition goes in its pouch first, then its strip; nothing else ever goes in the pouch.

Parameters ​

sim ​

SimWorld

eid ​

number

item ​

number

count ​

number

Returns ​

number