-- 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_locked_fluid(index) | → string? | Returns the fluid the fluidbox is locked onto |
Returns the fluid the fluidbox is locked onto | ||
get_fluid_segment_id(index) new | → uint? | Gets the unique ID of the fluid segment this fluid box belongs to. [...] |
Gets the unique ID of the fluid segment this fluid box belongs to. [...] | ||
get_fluid_segment_contents(index) new | → dictionary[string → uint]? | Gets counts of all fluids in the fluid segment. [...] |
Gets counts of all fluids in the fluid segment. [...] | ||
flush(index, fluid?) changed | → dictionary[string → float] | Flushes all fluid from this fluidbox and its fluid system. |
Flushes all fluid from this fluidbox and its fluid system. | ||
add_linked_connection(this_linked_connection_id, other_entity, other_linked_connection_id) new | Registers a linked connection between this entity and other entity. [...] | |
Registers a linked connection between this entity and other entity. [...] | ||
remove_linked_connection(this_linked_connection_id) new | Removes linked connection record. [...] | |
Removes linked connection record. [...] | ||
get_linked_connection(this_linked_connection_id) new | → LuaEntity?, uint? | Returns other end of a linked connection. |
Returns other end of a linked connection. | ||
get_linked_connections() new | → array[FluidBoxConnectionRecord] | Returns list of all linked connections registered for this entity. |
Returns list of all linked connections registered for this entity. | ||
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. |