From 316edc5374a2589cc307602cc8fff4f96734f01c Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Sun, 27 Nov 2016 14:37:43 +0000 Subject: [PATCH] Fix hopper stall bug --- init.lua | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/init.lua b/init.lua index b185198..98999dc 100644 --- a/init.lua +++ b/init.lua @@ -227,13 +227,9 @@ local transfer = function(src, srcpos, dst, dstpos, name) stack = inv:get_stack(src, i) item = stack:get_name() - -- if slot not empty - if item ~= "" then - - -- room in destination? - if inv2:room_for_item(dst, item) == false then - return - end + -- if slot not empty and room for item in destination + if item ~= "" + and inv2:room_for_item(dst, item) then -- is item a tool if stack:get_wear() > 0 then @@ -246,7 +242,6 @@ local transfer = function(src, srcpos, dst, dstpos, name) end return - end end