Types/FluidBox: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(converted to types page since the prototype was removed (or never existed))
Line 1: Line 1:
== Basics ==
== Basics ==
All general properties of entities that involve pipes. Because this is an abstract class it cannot be created in game, rather, it acts like a guideline to which all other entities with pipe aspects follow.
 
Used to set the fluid amount an entity can hold, as well as the connection points for pipes leading into and out of the entity.


== Properties ==
== Properties ==
=== fluid_box ===
=== base_area ===
Type: uknown
'''Type''': [[Types/unsigned]]
 
A base area of 1 will hold 100 units of water, 2 will hold 200, etc...
 
=== height ===
'''Type''': [[Types/unsigned]]
 
=== base_level ===
'''Type''': [[Types/unsigned]]
 
=== pipe_covers ===
'''Type''': Map of [[Types/string]] -> [[Types/Sprite]]


This is the property to set the water amount an entity can hold, as well as the connection points for pipes leading into and out of the entity.
The pictures to show when another fluid box connects to this one. Should look like this:


Example: Assembly Machine 2 Fluid Box
<pre>
<pre>
fluid_boxes =
pipe_covers = {
{
  north = {
  {
      ... sprite layers go here ...
    production_type = "input",
  },
    pipe_picture = assembler2pipepictures(),
  south = {
    pipe_covers = pipecoverspictures(),
      ... sprite layers go here ...
    base_area = 10,
  },
    base_level = -1,
  east = {
    pipe_connections = {{ type="input", position = {0, -2} }}
      ... sprite layers go here ...
  },
  },
  {
  west = {
    production_type = "output",
      ... sprite layers go here ...
    pipe_picture = assembler2pipepictures(),
  }
    pipe_covers = pipecoverspictures(),
}
    base_area = 10,
    base_level = 1,
    pipe_connections = {{ type="output", position = {0, 2} }}
  },
  off_when_no_fluid_recipe = true
},
</pre>
</pre>


A base area of 1 will hold 10 units of water, 2 will hold 20, etc...
=== pipe_connections ===
 
=== production_type ===
'''Type''': [[Types/string]]
 
Possible values:
* input
* input-output
* output
 
== Example ==
<pre>
fluid_box =
    {
      base_area = 1,
      height = 2,
      base_level = -1,
      pipe_covers = pipecoverspictures(),
      pipe_connections =
      {
        {type = "input-output", position = {-2, 0.5}},
        {type = "input-output", position = {2, 0.5}}
      },
      production_type = "input-output"
    },
</pre>

Revision as of 12:46, 15 July 2017

Basics

Used to set the fluid amount an entity can hold, as well as the connection points for pipes leading into and out of the entity.

Properties

base_area

Type: Types/unsigned

A base area of 1 will hold 100 units of water, 2 will hold 200, etc...

height

Type: Types/unsigned

base_level

Type: Types/unsigned

pipe_covers

Type: Map of Types/string -> Types/Sprite

The pictures to show when another fluid box connects to this one. Should look like this:

pipe_covers = {
   north = {
      ... sprite layers go here ...
   },
   south = {
      ... sprite layers go here ...
   },
   east = {
      ... sprite layers go here ...
   },
   west = {
      ... sprite layers go here ...
   }
}

pipe_connections

production_type

Type: Types/string

Possible values:

  • input
  • input-output
  • output

Example

fluid_box =
    {
      base_area = 1,
      height = 2,
      base_level = -1,
      pipe_covers = pipecoverspictures(),
      pipe_connections =
      {
        {type = "input-output", position = {-2, 0.5}},
        {type = "input-output", position = {2, 0.5}}
      },
      production_type = "input-output"
    },