Fix bug with multiple input inventories with the filters
authorNovatux <nathanael.courant@laposte.net>
Wed, 2 Jul 2014 10:42:33 +0000 (12:42 +0200)
committerNovatux <nathanael.courant@laposte.net>
Wed, 2 Jul 2014 10:42:33 +0000 (12:42 +0200)
item_transport.lua

index 558ea0d1c5a1d08c589b3e6d279635f96c93f75f..3a4b56378bd9f8362943af33e4851860b5796c73 100644 (file)
@@ -148,8 +148,9 @@ minetest.register_node("pipeworks:filter", {
                                end
                        end
                        if inv:is_empty("main") then
-                               grabAndFire(frominv, frominvname, frompos, fromnode, nil, tube, idef, dir)
-                               return true
+                               if grabAndFire(frominv, frominvname, frompos, fromnode, nil, tube, idef, dir) then
+                                       return true
+                               end
                        end
                        return false
                end
@@ -239,8 +240,9 @@ minetest.register_node("pipeworks:mese_filter", {
                                end
                        end
                        if inv:is_empty("main") then
-                               grabAndFire(frominv, frominvname, frompos, fromnode, nil, tube, idef, dir, true)
-                               return true
+                               if grabAndFire(frominv, frominvname, frompos, fromnode, nil, tube, idef, dir, true) then
+                                       return true
+                               end
                        end
                        return false
                end