1
0
forked from MTSR/moreblocks

Merge pull request #5 from kilbith/master

Speedup get_output_inv()
This commit is contained in:
Calinou 2015-06-14 20:49:41 +02:00
commit 7da13d56b6

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