Prototype/CraftingMachine: Difference between revisions
(Created page with "== Basics == The abstract basis of the assembling machines and furnaces. Contains the properties that both of them have. == Properties == This prototype inherits all the prop...") |
(added fluid_boxes) |
||
Line 2: | Line 2: | ||
The abstract basis of the assembling machines and furnaces. Contains the properties that both of them have. | The abstract basis of the assembling machines and furnaces. Contains the properties that both of them have. | ||
== | == Mandatory properties == | ||
This prototype inherits all the properties from [[Prototype/EntityWithHealth]]. | This prototype inherits all the properties from [[Prototype/EntityWithHealth]]. | ||
Line 34: | Line 34: | ||
Sets how much energy this machine uses while crafting. | Sets how much energy this machine uses while crafting. | ||
== Optional properties == | |||
=== module_specification === | === module_specification === | ||
Line 52: | Line 54: | ||
Sets the module effects that are allowed to be used on this machine. | Sets the module effects that are allowed to be used on this machine. | ||
=== fluid_boxes === | |||
'''Type''': [[Types/table]] of [[Types/FluidBox]] | |||
Can have off_when_no_fluid_recipe key that has a [[Types/bool]] value. | |||
<syntaxhighlight lang="lua">fluid_boxes = | |||
{ | |||
{ | |||
production_type = "input", | |||
pipe_picture = assembler2pipepictures(), | |||
pipe_covers = pipecoverspictures(), | |||
base_area = 10, | |||
base_level = -1, | |||
pipe_connections = {{ type="input", position = {0, -2} }}, | |||
secondary_draw_orders = { north = -1 } | |||
}, | |||
{ | |||
production_type = "output", | |||
pipe_picture = assembler2pipepictures(), | |||
pipe_covers = pipecoverspictures(), | |||
base_area = 10, | |||
base_level = 1, | |||
pipe_connections = {{ type="output", position = {0, 2} }}, | |||
secondary_draw_orders = { north = -1 } | |||
}, | |||
off_when_no_fluid_recipe = true | |||
},</syntaxhighlight> |
Revision as of 18:36, 25 October 2017
Basics
The abstract basis of the assembling machines and furnaces. Contains the properties that both of them have.
Mandatory properties
This prototype inherits all the properties from Prototype/EntityWithHealth.
animation
Type: Types/Animation
The animation played when crafting. When the crafting machine is idle, the animation will be paused.
crafting_categories
Type: Types/table of Types/strings
A list of recipe categories this crafting machine can use.
Example:
crafting_categories = {"crafting", "smelting"}
crafting_speed
Type: Types/double
How fast this crafting machine can craft. 1 means that for example a 1 second long recipe take 1 second to craft. 0.5 means it takes 2 seconds, and 2 means it takes 0.5 seconds.
energy_source
Type: Types/EnergySource
Defines how the crafting machine is powered.
energy_usage
Type: Types/EnergyPower
Sets how much energy this machine uses while crafting.
Optional properties
module_specification
Type: Types/ModuleSpecification
The number of module slots in this machine, and their icon positions.
module_specification = {
module_info_icon_shift = {
0,
0.8
},
module_slots = 2
},
allowed_effects
Type: Types/AllowedEffects
Sets the module effects that are allowed to be used on this machine.
fluid_boxes
Type: Types/table of Types/FluidBox
Can have off_when_no_fluid_recipe key that has a Types/bool value.
fluid_boxes =
{
{
production_type = "input",
pipe_picture = assembler2pipepictures(),
pipe_covers = pipecoverspictures(),
base_area = 10,
base_level = -1,
pipe_connections = {{ type="input", position = {0, -2} }},
secondary_draw_orders = { north = -1 }
},
{
production_type = "output",
pipe_picture = assembler2pipepictures(),
pipe_covers = pipecoverspictures(),
base_area = 10,
base_level = 1,
pipe_connections = {{ type="output", position = {0, 2} }},
secondary_draw_orders = { north = -1 }
},
off_when_no_fluid_recipe = true
},