[0.15.1] LuaFluidbox.get_capacity() indices off by 1
Posted: Mon Apr 24, 2017 10:01 pm
entity.fluidbox.get_capacity(i) and entity.fluidbox.get_connections(i) returns the capacity/connections of the (i+1)st fluid box
Example: To get the contents of a boiler's fluidboxes, you use boiler.fluidbox[1] and boiler.fluidbox[2]. To get their capacities, currently you need to use boiler.fluidbox.get_capacity(0) and boiler.fluidbox.get_capacity(1).
I'll assume this is a bug and not that you've suddenly switched to 0-based indexing.
Example: To get the contents of a boiler's fluidboxes, you use boiler.fluidbox[1] and boiler.fluidbox[2]. To get their capacities, currently you need to use boiler.fluidbox.get_capacity(0) and boiler.fluidbox.get_capacity(1).
I'll assume this is a bug and not that you've suddenly switched to 0-based indexing.