DrillingMachineBase
classBase class of resource extracting machines
Fields
| Name | Type | Description | |
|---|---|---|---|
| ticks_per_item | integer | Exact time to extract one item, in ticks | |
| remaining_energy | integer | Energy left of the current cycle | |
| productivity | integer | Bonus output percent, 15 means +15% | |
| total_production | integer | Completed cycles, bonus cycles included | |
| inventory | InventoryContainer | Output inventory | |
| energy | ResourceInventory | Energy inventory | |
| production | integer | Items produced per cycle | |
| storage_size | integer | Output inventory capacity | |
| last_speed | integer | Last measured speed percent | |
| current_recipe_time | integer | Ticks of the recipe in progress | |
Functions
DrillingMachineBase:has_storage_space()
Whether the output inventory can take one more item
returns boolean
DrillingMachineBase:is_energy_available()
Whether the current cycle still has energy
returns boolean
DrillingMachineBase:get_source()
Deposit being mined, nil for machines without one
returns SourceData
Standard members (2)
These members are available on all classes of this kind.
| DrillingMachineBase.cast(object) | Trying to cast Object into DrillingMachineBase |
| DrillingMachineBase.get_class() | Return DrillingMachineBase class object |
Inherited from BlockLogic (15)
- map_register Whether this block shows up on the map
- static_block Prototype this block was spawned from
- pos read-only Cell this block stands in
- quat read-only Rotation turning the block's local sides into world sides
- state read-only State shown under the crosshair, one of defines.block_state
- settings read-only Settings of the block as its window and the save hold them, a fresh copy on every read
- inventories read-only Inventories the block saves, by name, each as its own class
- BlockLogic:reg(accessor) Register Accessor
- BlockLogic:find_accessor(name) Find a registered accessor by name
- BlockLogic:accessors() Every accessor registered on this block
- BlockLogic:component(name) Fields of one of the block's components, a fresh copy on every read
- BlockLogic:set_component(name, fields) Change fields of one of the block's components: the fields given change, the rest keep their values; an item field takes the item, its name or nil
- BlockLogic:get_field(name, field) One field of one of the block's components
- BlockLogic:set_field(name, field, value) Change one field of one of the block's components
- BlockLogic:edit_settings(fields) Change settings the way the block's window does: only the fields given change, a prototype stands for its name. The edit goes out to the other peers and lands at the host's stamped tick, so read settings back a tick later
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