InventoryAccess
classInventory interface with add and remove operations
Fields
| Name | Type | Description |
|---|---|---|
| zero_slots | boolean | |
| 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)
Generated for every class of this kind by the game's codegen, not written for InventoryAccess.
| InventoryAccess.cast(object) | Trying to cast Object into InventoryAccess |
| InventoryAccess.get_class() | Return InventoryAccess class object |
Inherited from InventoryReader (3)
- size 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 Object name
- Object.find(name) Find an already loaded object by name
- Object:get_class() Class of this object