diff options
author | kilbith <jeanpatrick.guerrero@gmail.com> | 2015-06-14 20:42:23 +0200 |
---|---|---|
committer | kilbith <jeanpatrick.guerrero@gmail.com> | 2015-06-14 20:42:23 +0200 |
commit | 68e5b76c90c70e760dfcbc1db84e94e6cdcbf707 (patch) | |
tree | 34a9fe497f00ff3ebb66ba887bf62e591fdf476a /circular_saw.lua | |
parent | e8e4316ee6d24852471c273fdd83c9e9d770acfc (diff) |
Speedup get_output_inv()
Diffstat (limited to 'circular_saw.lua')
-rw-r--r-- | circular_saw.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/circular_saw.lua b/circular_saw.lua index 4735dcd..142a95f 100644 --- a/circular_saw.lua +++ b/circular_saw.lua @@ -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 |