[0.16.7] wrong array size of #entity.fluidbox on tank-wagon
Posted: Fri Dec 22, 2017 6:18 am
#entity.fluidbox for fluid-wagons still reports 3 for 0.16.7 causing the following code to crash with index out of bounds.
expected behavior:
#entity.fluidbox returning 1
Code: Select all
if entity.type == "fluid-wagon" then
for n=1, #entity.fluidbox do
log("get fluidbox "..n.."/"..#entity.fluidbox)
capacity = capacity + entity.fluidbox.get_capacity(n)
end
end
#entity.fluidbox returning 1