]> git.lizzy.rs Git - xdecor.git/commitdiff
Workbench: Fix special case of unknown items output (#90)
authorJP Guerrero <jeanpatrick.guerrero@gmail.com>
Tue, 17 Apr 2018 11:17:56 +0000 (13:17 +0200)
committerJP Guerrero <jeanpatrick.guerrero@gmail.com>
Tue, 17 Apr 2018 11:17:56 +0000 (13:17 +0200)
src/workbench.lua

index 740ba5c80cdc46eef15179c328cea43bdb8f8583..ad69361fe27ba4058a932122545017888ee1687c 100644 (file)
@@ -70,6 +70,7 @@ function workbench:get_output(inv, input, name)
                item = nbox[3] and item or "stairs:"..nbox[1].."_"..name:match(":(.*)")
                output[#output+1] = item.." "..count
        end
+
        inv:set_list("forms", output)
 end
 
@@ -201,7 +202,7 @@ function workbench.on_take(pos, listname, index, stack, player)
        local stackname = stack:get_name()
 
        if listname == "input" then
-               if stackname == inputname then
+               if stackname == inputname and registered_nodes[inputname.."_cube"] then
                        workbench:get_output(inv, input, stackname)
                else
                        inv:set_list("forms", {})