On the discord Wiwiweb was wondering if the method could return multiple fluids, since with the current fluid mechanics mixing is just not possible:
https://discord.com/channels/1396775903 ... 0454679623
After some investigating it indeed seems impossible for this method to ever return more than 1 fluid name, and it should probably be mentioned:
LuaFluidBox::get_fluid_segment_contents() can return at most 1 fluid name
LuaFluidBox::get_fluid_segment_contents() can return at most 1 fluid name
- Attachments
-
- Screenshot 2025-02-16 at 21.20.04.png (37.25 KiB) Viewed 393 times
Re: LuaFluidBox::get_fluid_segment_contents() can return at most 1 fluid name
A couple related changes:
https://lua-api.factorio.com/latest/types/FluidBox.html
"a fluid system (ie. multiple connected fluid boxes) can contain multiple different fluids, see Fluid mixing."
No such things as fluid systems anymore, and segments can only contain 1 fluid.
https://lua-api.factorio.com/latest/cla ... t_capacity
"The capacity of the given fluidbox index."
Actually this returns the capacity of the entire fluid segment (which is great). For the capacity of a specific entity or fluidbox, there's https://lua-api.factorio.com/latest/cla ... d_capacity, or https://lua-api.factorio.com/latest/cla ... prototypes
https://lua-api.factorio.com/latest/types/FluidBox.html
"a fluid system (ie. multiple connected fluid boxes) can contain multiple different fluids, see Fluid mixing."
No such things as fluid systems anymore, and segments can only contain 1 fluid.
https://lua-api.factorio.com/latest/cla ... t_capacity
"The capacity of the given fluidbox index."
Actually this returns the capacity of the entire fluid segment (which is great). For the capacity of a specific entity or fluidbox, there's https://lua-api.factorio.com/latest/cla ... d_capacity, or https://lua-api.factorio.com/latest/cla ... prototypes
Re: LuaFluidBox::get_fluid_segment_contents() can return at most 1 fluid name
Thanks for the detailed report, fixed the things you mentioned. We'll consider changing the get_fluid_segment_contents method to only return a single value instead of a table.