aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCalinou <calinou@opmbx.org>2014-07-20 21:58:12 +0200
committerCalinou <calinou@opmbx.org>2014-07-20 21:58:12 +0200
commit28741bf242f64fe52fc686fe3683d5015a90f3e2 (patch)
tree0adc1051eb070581932e7d55563295d2e0b9816f
parentc617fb57afddc435b07c96acfaebdd0b7aacc9ef (diff)
downloadmoreblocks-28741bf242f64fe52fc686fe3683d5015a90f3e2.tar.gz
moreblocks-28741bf242f64fe52fc686fe3683d5015a90f3e2.tar.bz2
moreblocks-28741bf242f64fe52fc686fe3683d5015a90f3e2.zip
Add an upper cap to circular saw max.
-rw-r--r--circular_saw.lua4
1 files changed, 1 insertions, 3 deletions
diff --git a/circular_saw.lua b/circular_saw.lua
index 8514a6f..47c1a8c 100644
--- a/circular_saw.lua
+++ b/circular_saw.lua
@@ -61,9 +61,7 @@ function circular_saw:get_cost(inv, stackname)
end
function circular_saw:get_output_inv(modname, material, amount, max)
- if (not max or max < 1) then
- max = 99
- end
+ if (not max or max < 1 or max > 99) then max = 99 end
local list = {}
-- If there is nothing inside, display empty inventory: