From 28741bf242f64fe52fc686fe3683d5015a90f3e2 Mon Sep 17 00:00:00 2001 From: Calinou Date: Sun, 20 Jul 2014 21:58:12 +0200 Subject: [PATCH] Add an upper cap to circular saw max. --- circular_saw.lua | 4 +--- 1 file changed, 1 insertion(+), 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: