InventoryAccess
classInventory interface with add and remove operations
Fields
| Name | Type | Description | |
|---|---|---|---|
| zero_slots | boolean | Keeps a slot whose count drops to zero | |
| draggable | boolean | Whether inventory can be dragged in UI (default: true) | |
Functions
InventoryAccess:add(item, count)
Add item with count to InventoryAccess
| item | StaticItem | |
| count | integer |
returns integer Remainder
InventoryAccess:sub(item, count)
Remove item with count from InventoryAccess
| item | StaticItem | |
| count | integer |
returns integer Remainder
Standard members (2)
Every class of this kind carries these.
| InventoryAccess.cast(object) | Trying to cast Object into InventoryAccess |
| InventoryAccess.get_class() | Return InventoryAccess class object |
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
Subclasses
Used by
- BaseInventoryAccessor.input field
- BaseInventoryAccessor.output field
- InventoryContainer.get_access return
- InventoryContainer.bind param
- InventoryInventoryFilter.inventory field
- StorageBlockLogic.storage_access field
- ui.Inventory.inventory field