Types/FluidBox: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(Removed old prototype docs)
 
(21 intermediate revisions by 9 users not shown)
Line 1: Line 1:
== Basics ==
<div class="stub"><p>'''The prototype docs have moved to a new website with an improved format.''' This documentation page can now be found here: [https://lua-api.factorio.com/latest/types/FluidBox.html https://lua-api.factorio.com/latest/types/FluidBox.html]
[[File:Fluidboxes.png|thumb|550px|Visual representation of base_area, base_level and height. When all the fluidboxes are connected, the water leaves fluidbox A and flows into the other 3 boxes through fluidbox B until the water level is equal in all boxes. For more info about fluids, see [[Fluid system#See also]].]]
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.


== Mandatory properties ==
</p><p>This wiki page is no longer updated and '''will be removed at some point in the future''', so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback [https://forums.factorio.com/viewforum.php?f=233 on the forums].</p></div>
 
=== pipe_connections ===
'''Type''': [[Types/table]] of [[Types/PipeConnectionDefinition]]
 
Max number of members is 255.
 
== Optional properties ==
 
=== base_area ===
'''Type''': [[Types/double]]
 
'''Default''': 1
 
Must be greater than 0.
 
=== base_level ===
'''Type''': [[Types/double]]
 
'''Default''': 0
 
=== height ===
'''Type''': [[Types/double]]
 
'''Default''': 1
 
Must be greater than 0.
 
=== filter ===
'''Type''': [[Types/string]]
 
Can be used to specify which fluid is allowed to enter this fluid box. [https://forums.factorio.com/viewtopic.php?f=28&t=46302]
 
=== render_layer ===
'''Type''': [[Types/RenderLayer]]
 
'''Default''': "object"
 
=== pipe_covers ===
'''Type''': [[Types/Sprite4Way]]
 
The pictures to show when another fluid box connects to this one.
 
=== pipe_picture ===
'''Type''': [[Types/Sprite4Way]]
 
=== minimum_temperature ===
'''Type''': [[Types/double]]
 
The minimum temperature allowed into the fluidbox.
 
<syntaxhighlight lang="lua">minimum_temperature = 100.0</syntaxhighlight>
 
=== maximum_temperature ===
'''Type''': [[Types/double]]
 
The maximum temperature allowed into the fluidbox. Only works if a filter is specified [https://forums.factorio.com/viewtopic.php?p=496738#p496738].  
 
<syntaxhighlight lang="lua">maximum_temperature = 1000.0</syntaxhighlight>
 
=== production_type ===
'''Type''': [[Types/string]]
 
'''Default''': "None"
 
Possible values:
* "None"
* "input"
* "input-output"
* "output"
 
=== secondary_draw_order ===
'''Type''': [[Types/int8]]
 
'''Default''': 1
 
Set the secondary draw order for all orientations.
 
=== secondary_draw_orders ===
'''Type''': [[Types/table]] of [[Types/int8]]
 
'''Default''': {north = 1, east = 1, south = 1, west = 1}
 
Set the secondary draw order for each orientation.
 
== Example ==
 
<syntaxhighlight lang="lua">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"
    },
</syntaxhighlight>

Latest revision as of 14:32, 25 October 2024

The prototype docs have moved to a new website with an improved format. This documentation page can now be found here: https://lua-api.factorio.com/latest/types/FluidBox.html

This wiki page is no longer updated and will be removed at some point in the future, so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback on the forums.