AbstractCrafter
classBase class for recipe processing machines
Fields
| Name | Type | Description |
|---|---|---|
| recipes | RecipeDictionary | |
| load_independent | boolean | |
| stable_supply | boolean | |
| input_gathered | boolean | |
| switch_on | boolean | |
| ticks_passed | integer | |
| real_ticks_passed | integer | |
| total_production | integer | |
| speed | integer | |
| boost | integer | percent pushed by boosters this tick (50 = +50%) |
| productivity | integer | percent (e.g. 15 = +15%) |
| energy_input_inventory | ResourceInventory | |
| energy_output_inventory | ResourceInventory | |
| crafter_input_container | InventoryContainer | |
| crafter_output_container | InventoryContainer |
Functions
AbstractCrafter:select_recipe_by_output(item)
Select the recipe producing an item, the way a player picks it in the machine window
| item | StaticItem |
returns boolean False when the crafter has no recipe dictionary, or when a network session took the pick over and will apply it on its own tick; either way the current recipe is untouched right now
Standard members (4)
Generated for every class of this kind by the game's codegen, not written for AbstractCrafter.
| AbstractCrafter.cast(object) | Trying to cast Object into AbstractCrafter |
| AbstractCrafter.get_class() | Return AbstractCrafter class object |
| AbstractCrafter.new(parent, name) | Creates a new AbstractCrafter instance |
| AbstractCrafter.new_simple() | Creates a new AbstractCrafter instance |
Inherited from BlockLogic (7)
- map_register Whether this block shows up on the map
- static_block Prototype this block was spawned from
- pos Cell this block stands in
- quat Rotation turning the block's local sides into world sides
- BlockLogic:reg(accessor) Register Accessor
- BlockLogic:find_accessor(name) Find a registered accessor by name
- BlockLogic:accessors() Every accessor registered on this block
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