-- Double the temperature of the fluid in entity's first fluid box.
fluid = entity.fluidbox[1]
fluid.temperature = fluid.temperature * 2
entity.fluidbox[1] = fluid
get_prototype(index) | → LuaFluidBoxPrototype or array[LuaFluidBoxPrototype] | The prototype of this fluidbox index. [...] |
The prototype of this fluidbox index. [...] | ||
get_capacity(index) | → double | The capacity of the given fluidbox index. |
The capacity of the given fluidbox index. | ||
get_connections(index) | → array[LuaFluidBox] | The fluidboxes to which the fluidbox at the given index is connected. |
The fluidboxes to which the fluidbox at the given index is connected. | ||
get_pipe_connections(index) | → array[PipeConnection] | Get the fluid box's connections and associated data. |
Get the fluid box's connections and associated data. | ||
get_filter(index) | → FluidBoxFilter? | Get a fluid box filter |
Get a fluid box filter | ||
set_filter(index, filter) | → boolean | Set a fluid box filter. [...] |
Set a fluid box filter. [...] | ||
get_flow(index) | → double | Flow through the fluidbox in the last tick. [...] |
Flow through the fluidbox in the last tick. [...] | ||
get_locked_fluid(index) | → string? | Returns the fluid the fluidbox is locked onto. |
Returns the fluid the fluidbox is locked onto. | ||
get_fluid_system_id(index) | → uint? | Gets unique fluid system identifier of selected fluid box. [...] |
Gets unique fluid system identifier of selected fluid box. [...] | ||
get_fluid_system_contents(index) | → dictionary[string → uint]? | Gets counts of all fluids in the fluid system. [...] |
Gets counts of all fluids in the fluid system. [...] | ||
flush(index, fluid?) | → dictionary[string → float] | Flushes all fluid from this fluidbox and its fluid system. |
Flushes all fluid from this fluidbox and its fluid system. | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
owner [R] | :: LuaEntity | The entity that owns this fluidbox. |
The entity that owns this fluidbox. | ||
valid [R] | :: boolean | Is this object valid? [...] |
Is this object valid? [...] | ||
object_name [R] | :: string | The class name of this object. [...] |
The class name of this object. [...] | ||
[] (index) [R] | :: Fluid? | Access, set or clear a fluid box. [...] |
Access, set or clear a fluid box. [...] | ||
# (length) [R] | :: uint | Number of fluid boxes. |
Number of fluid boxes. |
index | :: uint | The index of the filter to get. |
The index of the filter to get. |
→ FluidBoxFilter? | The filter at the requested index, or |
index | :: uint | The index of the filter to set. |
The index of the filter to set. | ||
filter | :: FluidBoxFilterSpec or nil | The filter to set. Setting |
The filter to set. Setting |
→ boolean | Whether the filter was set successfully. |