API JavaScript
inventory
18 membres
- inventory.add(id, quantity?, data?)returns false if full
- inventory.remove(id, quantity?)
- inventory.has(id, quantity?)
- inventory.count(id)
- inventory.get(id)
- inventory.getAll()
- inventory.clear()
- inventory.define(id, { maxStack, weight, category, tags, equipSlot })
- inventory.getInstance(id)
- inventory.removeInstance(id, qty?)
- inventory.updateInstance(id, patch)
- inventory.query({ category?, tag?, text? })
- inventory.setMaxSlots(n)
- inventory.setMaxWeight(n)
- inventory.getCapacity()
- inventory.onChange(cb) → unsubscribe
- inventory.save(slot?)
- inventory.load(slot?)