Why do fluids require us to iterate over every fluidbox in every wagon?
Code: Select all
for _, wagon in pairs(train.fluid_wagons) do
for i=1, #wagon.fluidbox do
Code: Select all
for _, wagon in pairs(train.fluid_wagons) do
for i=1, #wagon.fluidbox do
That would be just as fine.Rseding91 wrote:get_contents can't return items and fluids because the names can collide and it's a string -> count mapping.
I could add get_fluid_contents (and all the other same methods that items have but for fluids).
Code: Select all
inventory = train.get_contents() or train.get_fluid_contents()