Fix tube connection to filters
authorAnthony <azhang9@gmail.com>
Mon, 1 Apr 2013 17:21:39 +0000 (14:21 -0300)
committerAnthony <azhang9@gmail.com>
Mon, 1 Apr 2013 17:21:39 +0000 (14:21 -0300)
Tubes did not previously connect to filters when the filters were placed after the tube.

item_transport.lua

index 305a459714e4d2a394f54109fdcef6778bfc4d50..b277e2d9dd3d351025db4b46dc035ecaa1da5f01 100644 (file)
@@ -30,6 +30,9 @@ minetest.register_node("pipeworks:filter", {
                local inv = meta:get_inventory()
                return inv:is_empty("main")
        end,
+       after_place_node = function(pos)
+               tube_scanforobjects(pos)
+       end,
        mesecons={effector={action_on=function(pos,node)
                                        minetest.registered_nodes[node.name].on_punch(pos,node,nil)
                                end}},
@@ -470,4 +473,4 @@ function go_next(pos,velocity,stack)
                velocity.z=chests[n].vect.z*speed
        end
        return 1
-end
\ No newline at end of file
+end