Prototype/CraftingMachine: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(added fluid_boxes)
(→‎Optional properties: working_visualisations)
Line 82: Line 82:
       off_when_no_fluid_recipe = true
       off_when_no_fluid_recipe = true
     },</syntaxhighlight>
     },</syntaxhighlight>
=== working_visualisations ===

Revision as of 19:20, 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
    },

working_visualisations