mirror of
https://github.com/minetest-mods/moreblocks.git
synced 2024-12-26 18:50:22 +01:00
Speedup get_output_inv()
This commit is contained in:
parent
e8e4316ee6
commit
68e5b76c90
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user