Merge pull request #3 from kilbith/master

Speed up remnant stack calculation
This commit is contained in:
Calinou 2015-06-06 12:32:07 +02:00
commit 44de1f711e
1 changed files with 2 additions and 1 deletions

View File

@ -93,9 +93,10 @@ function circular_saw:get_output_inv(modname, material, amount, max)
for i, t in ipairs(circular_saw.names) do
local cost = circular_saw.cost_in_microblocks[i]
local balance = math.min(math.floor(amount/cost), max)
pos = pos + 1
list[pos] = modname .. ":" .. t[1] .. "_" .. material .. t[2]
.. " " .. math.min(math.floor(amount/cost), max)
.. " " .. balance
end
return list
end