ResourceAccessor
classAccessor that transfers a resource through a block side
Fields
| Name | Type | Description |
|---|---|---|
| inventory | ResourceInventory | Resource inventory bound to this side |
| is_input | boolean | Side consumes the resource |
| is_output | boolean | Side produces the resource |
| channel | string | Resource network channel name |
Functions
ResourceAccessor:init(side, pos, inventory, is_input, is_output, channel)
Configure side, position, inventory and channel at once
| side | Vec3i | Side direction of the owning block |
| pos | Vec3i | Block local position |
| inventory | ResourceInventory | Resource inventory to bind |
| is_input | boolean | Side consumes the resource |
| is_output | boolean | Side produces the resource |
| channel | string | Resource network channel name |
Standard members (3)
Generated for every class of this kind by the game's codegen, not written for ResourceAccessor.
| ResourceAccessor.cast(object) | Trying to cast Object into ResourceAccessor |
| ResourceAccessor.get_class() | Return ResourceAccessor class object |
| ResourceAccessor.new(parent, name) | Creates a new ResourceAccessor attached to a block |
Inherited from Accessor (5)
- side Side direction of the owning block
- pos Block local position
- owner Block this accessor belongs to
- cover Cover prototype placed on this side
- Accessor:neighbor() Accessor of the neighbor block this side touches, nil when nothing is attached to it
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