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))
(Removed old prototype docs)
 
(27 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]


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.
</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>
 
== 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:
 
<pre>
pipe_covers = {
  north = {
      ... sprite layers go here ...
  },
  south = {
      ... sprite layers go here ...
  },
  east = {
      ... sprite layers go here ...
  },
  west = {
      ... sprite layers go here ...
  }
}
</pre>
 
=== 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>

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.