From d7620f7cb90dffeb07e7442d6e38c1e69081086e Mon Sep 17 00:00:00 2001 From: Och Noe Date: Mon, 22 Oct 2018 23:00:57 +0200 Subject: http://linux-forks.de/moreblocks/71.html fixed --- circular_saw.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/circular_saw.lua b/circular_saw.lua index b0a6d64..b0b039c 100644 --- a/circular_saw.lua +++ b/circular_saw.lua @@ -242,6 +242,9 @@ function circular_saw.allow_metadata_inventory_put( local incost = (incount * 8) + microstack:get_count() local maxcost = (stackmax * 8) + 7 local cost = circular_saw:get_cost(inv, stackname) + if not cost then + return 0 + end if (incost + cost) > maxcost then return math.max((maxcost - incost) / cost, 0) end -- cgit v1.2.3