Types/FluidBox: Difference between revisions
Jump to navigation
Jump to search
(→Properties: added filter (0.16 feature) and minimum + maximum temp) |
(fixed types, added default values for optional things) |
||
Line 5: | Line 5: | ||
== Properties == | == Properties == | ||
=== base_area === | === base_area === | ||
'''Type''': [[Types/ | '''Type''': [[Types/double]] | ||
A base area of 1 will hold 100 units of water, 2 will hold 200, etc... | A base area of 1 will hold 100 units of water, 2 will hold 200, etc... | ||
=== height === | === height === | ||
'''Type''': [[Types/ | '''Type''': [[Types/double]] | ||
Optional, default 1. | |||
=== base_level === | === base_level === | ||
'''Type''': [[Types/ | '''Type''': [[Types/double]] | ||
Optional, default 0. | |||
=== pipe_covers === | === pipe_covers === | ||
Line 58: | Line 62: | ||
=== minimum_temperature === | === minimum_temperature === | ||
'''Type''': | '''Type''': [[Types/double]] | ||
Optional. The minimum temperature allowed into the fluidbox. | Optional. The minimum temperature allowed into the fluidbox. | ||
Line 65: | Line 69: | ||
=== maximum_temperature === | === maximum_temperature === | ||
'''Type''': | '''Type''': [[Types/double]] | ||
Optional. The maximum temperature allowed into the fluidbox. | Optional. The maximum temperature allowed into the fluidbox. | ||
Line 72: | Line 76: | ||
== Example == | == Example == | ||
< | |||
fluid_box = | <syntaxhighlight lang="lua">fluid_box = | ||
{ | { | ||
base_area = 1, | base_area = 1, | ||
Line 86: | Line 90: | ||
production_type = "input-output" | production_type = "input-output" | ||
}, | }, | ||
</ | </syntaxhighlight> |
Revision as of 09:15, 8 November 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/double
A base area of 1 will hold 100 units of water, 2 will hold 200, etc...
height
Type: Types/double
Optional, default 1.
base_level
Type: Types/double
Optional, default 0.
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
filter
Type: Types/string
Added in 0.16
Optional. Can be used to specify which fluid is allowed to enter this fluid box. [1]
filter = "steam"
minimum_temperature
Type: Types/double
Optional. The minimum temperature allowed into the fluidbox.
minimum_temperature = 100.0
maximum_temperature
Type: Types/double
Optional. The maximum temperature allowed into the fluidbox.
maximum_temperature = 1000.0
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"
},