Whenever I print the inventory of a railcar filled with nitrogen, the stack.count is higher than the type.max. the max is always 50000 but the count is usually higher than 1 mil. See code:
function printInventory(invs, col)
local i = 0
local row = 6
invs:sort()
gpu2:setText(0, 5, "Inventories -----------------------------------------------------------------------------------------------")
while (i < invs.Size) do
local t = nil
local stack = invs:getStack(i)
if (stack.item) then t = stack.item.type end
if(t) then
local c = stack.count
local m = t.max
local n = string.sub(t.name, 1, 20)
gpu2:setText(col, row, n .. ": " .. c .. "/" .. m)
row = row + 1
end
i = i + 1
end
return row > 6
end
Whenever I print the inventory of a railcar filled with nitrogen, the stack.count is higher than the type.max. the max is always 50000 but the count is usually higher than 1 mil. See code: