summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNovatux <nathanael.courant@laposte.net>2014-07-02 12:42:33 +0200
committerNovatux <nathanael.courant@laposte.net>2014-07-02 12:42:33 +0200
commitdf1c9d087492d1f518d721551e834fb43ede8aaf (patch)
treef5db9970c8fad58934b9c4071c81e5358f3bddb5
parent99a902a8b88bb0bf6a76f91c608cb07478c0efb9 (diff)
downloadpipeworks-df1c9d087492d1f518d721551e834fb43ede8aaf.tar
pipeworks-df1c9d087492d1f518d721551e834fb43ede8aaf.tar.gz
pipeworks-df1c9d087492d1f518d721551e834fb43ede8aaf.tar.bz2
pipeworks-df1c9d087492d1f518d721551e834fb43ede8aaf.tar.xz
pipeworks-df1c9d087492d1f518d721551e834fb43ede8aaf.zip
Fix bug with multiple input inventories with the filters
-rw-r--r--item_transport.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/item_transport.lua b/item_transport.lua
index 558ea0d..3a4b563 100644
--- a/item_transport.lua
+++ b/item_transport.lua
@@ -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