Speedup get_output_inv()

This commit is contained in:
kilbith 2015-06-14 20:42:23 +02:00
parent e8e4316ee6
commit 68e5b76c90

View File

@ -91,7 +91,8 @@ function circular_saw:get_output_inv(modname, material, amount, max)
return list return list
end 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 cost = circular_saw.cost_in_microblocks[i]
local balance = math.min(math.floor(amount/cost), max) local balance = math.min(math.floor(amount/cost), max)
pos = pos + 1 pos = pos + 1