SingleSlotInventory
classInventory with exactly one slot
Fields
| Name | Type | Description | |
|---|---|---|---|
| capacity | integer | ||
Functions
Standard members (4)
Every class of this kind carries these.
| SingleSlotInventory.cast(object) | Trying to cast Object into SingleSlotInventory |
| SingleSlotInventory.get_class() | Return SingleSlotInventory class object |
| SingleSlotInventory.new(parent, name) | Creates a new SingleSlotInventory instance |
| SingleSlotInventory.new_simple() | Creates a new SingleSlotInventory instance |
Inherited from InventoryAccess (4)
- zero_slots Keeps a slot whose count drops to zero
- draggable Whether inventory can be dragged in UI (default: true)
- InventoryAccess:add(item, count) Add item with count to InventoryAccess
- InventoryAccess:sub(item, count) Remove item with count from InventoryAccess
Inherited from InventoryReader (3)
- size read-only Number of slots in this InventoryReader
- InventoryReader:get(index) Get ItemData with index from InventoryReader
- InventoryReader:find(item) Looking for index of StaticItem in InventoryReader
Inherited from Instance (1)
- Instance:is_valid() Returns false once the underlying engine object has been destroyed
Inherited from Object (3)
- name read-only Object name
- Object.find(name) Find an already loaded object by name
- Object:get_class() Class of this object