Speedup get_output_inv()

This commit is contained in:
kilbith 2015-06-14 20:42:23 +02:00
parent e8e4316ee6
commit 68e5b76c90
1 changed files with 2 additions and 1 deletions

View File

@ -91,7 +91,8 @@ function circular_saw:get_output_inv(modname, material, amount, max)
return list
end
for i, t in ipairs(circular_saw.names) do
for i = 1, #circular_saw.names do
local t = circular_saw.names[i]
local cost = circular_saw.cost_in_microblocks[i]
local balance = math.min(math.floor(amount/cost), max)
pos = pos + 1