An array of fluid boxes of an entity. Entities may contain more than one fluid box, and some can change the number of fluid boxes -- for instance, an assembling machine will change its number of fluid boxes depending on its active recipe.
Do note that reading from a LuaFluidBox creates a new table and writing will copy the given fields from the table into the engine's own fluid box structure. Therefore, the correct way to update a fluidbox of an entity is to read it first, modify the table, then write the modified table back. Directly accessing the returned table's attributes won't have the desired effect.
entity's first fluid box.
fluid = entity.fluidbox
fluid.temperature = fluid.temperature * 2
entity.fluidbox = fluid
|get_prototype(index) → LuaFluidBoxPrototype||The prototype of this fluidbox index.|
|get_capacity(index) → double||The capacity of the given fluidbox index.|
|get_connections(index) → array[LuaFluidBox]||The fluidbox connections for the given fluidbox index.|
|get_filter(index) → FluidBoxFilter||Get a fluid box filter|
|set_filter(index, filter) → boolean||Set a fluid box filter.|
|get_flow(index) → double||Flow through the fluidbox in the last tick.|
|get_locked_fluid(index) → string||Returns the fluid the fluidbox is locked onto Returns 'nil' for no lock|
|flush(index, fluid) → dictionary[string → float]||Flushes all fluid from this fluidbox and its fluid system.|
|operator # :: uint [R]||Number of fluid boxes.|
|owner :: LuaEntity [R]||The entity that owns this fluidbox.|
|operator  :: Fluid [R]||Access, set or clear a fluid box.|
|valid :: boolean [R]||Is this object valid?|
|object_name :: string [R]||The class name of this object.|
|help() → string||All methods and properties that this object supports.|
The prototype of this fluidbox index.
The fluidbox connections for the given fluidbox index.
Get a fluid box filter
nilif there isn't one.
Set a fluid box filter.
Flow through the fluidbox in the last tick. It is the larger of in-flow and out-flow.
Returns the fluid the fluidbox is locked onto Returns 'nil' for no lock
Number of fluid boxes.
The entity that owns this fluidbox.
Access, set or clear a fluid box. The index must always be in bounds (see LuaFluidBox::operator #).
New fluidboxes may not be added or removed using this operator. If the given fluid box doesn't contain any
nil is returned. Similarly,
nil can be written to a fluid box to remove all fluid from it.