Types/FluidBox: Difference between revisions
(secondary draw order description) |
(→Basics: temporary defail info,for the past I was stuck here,need improvement) |
||
Line 2: | Line 2: | ||
[[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]].]] | [[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. | 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. | ||
for each entity,they may have mutiple fluid box, | |||
it can come from both energy source,crafting machines` fluidboxes or just normal property storage tank and pumps etc. | |||
for each fluidbox,it should only storage ONE type of fluid at time, | |||
but it do storage mutiple fluid(call fluid mixing,a forbidden technique), | |||
to avoid fluid mixing,you can setting up filter for certain fluid, | |||
or it is a crafting machine that will automatically disable unused fluid box. | |||
for each fluidbox,it may have mutiple connection point(shown as blue arrow in alt mode,some entity won`t display its connection point tho), | |||
fluid may flow in or out depanding on connection point setting, | |||
and connection point may depand on direction this entity currently facing,which will be defined as a table of connections. | |||
== Mandatory properties == | == Mandatory properties == |
Revision as of 07:51, 1 November 2021
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.
for each entity,they may have mutiple fluid box,
it can come from both energy source,crafting machines` fluidboxes or just normal property storage tank and pumps etc.
for each fluidbox,it should only storage ONE type of fluid at time, but it do storage mutiple fluid(call fluid mixing,a forbidden technique), to avoid fluid mixing,you can setting up filter for certain fluid, or it is a crafting machine that will automatically disable unused fluid box.
for each fluidbox,it may have mutiple connection point(shown as blue arrow in alt mode,some entity won`t display its connection point tho), fluid may flow in or out depanding on connection point setting, and connection point may depand on direction this entity currently facing,which will be defined as a table of connections.
Mandatory properties
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
Name of a Prototype/Fluid. Can be used to specify which fluid is allowed to enter this fluid box. [1]
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. Only applied if a filter
is specified [2].
minimum_temperature = 100.0
maximum_temperature
Type: Types/double
The maximum temperature allowed into the fluidbox. Only applied if a filter
is specified [3].
maximum_temperature = 1000.0
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. Used to determine render order for sprites with the same render_layer
in the same position. Sprites with a higher secondary_draw_order
are drawn on top.
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. Used to determine render order for sprites with the same render_layer
in the same position. Sprites with a higher secondary_draw_order
are drawn on top.
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"
},