Skip to content

giveItem beta ​

Function of @v12-engine/engine

ts
export declare function giveItem(world: World, entity: Entity, instance: ItemInstance): boolean;

Puts an item into the inventory: into a stack of it with room (ItemDef.stack, its charges added), or the first free slot. False when there is neither. The engine's rules of what may be carried are asked before (carryRefusal)