What it does
inventory.define takes id and an options object.
Signature
inventory.define(id, { maxStack, weight, category, tags, equipSlot })Arguments
id{ maxStack, weight, category, tags, equipSlot }Keys:
maxStackweightcategorytagsequipSlot
Example · generated
function start() { inventory.define('main', { maxStack: 1, weight: 1, category: 1 });}inventory.define is called with values of the shape its signature asks for. The code sits in start(), which the engine calls once, when the entity spawns.