diff --git a/tubelib/command.lua b/tubelib/command.lua index bfadf1d..eb72ab4 100644 --- a/tubelib/command.lua +++ b/tubelib/command.lua @@ -340,9 +340,15 @@ function tubelib.register_node(name, add_names, node_definition) end if node_definition.on_pull_item or node_definition.on_push_item or node_definition.is_pusher then - Tube:add_secondary_node_names({name}, node_definition.valid_sides) - Tube:add_secondary_node_names(add_names, node_definition.valid_sides) + Tube:add_secondary_node_names({name}) + Tube:add_secondary_node_names(add_names) + if node_definition.valid_sides then + Tube:set_valid_sides(name, node_definition.valid_sides) + for _,n in ipairs(add_names) do + Tube:set_valid_sides(n, node_definition.valid_sides) + end + end tubelib.KnownNodes[name] = true for _,n in ipairs(add_names) do tubelib.KnownNodes[n] = true diff --git a/tubelib_addons3/teleporter.lua b/tubelib_addons3/teleporter.lua index ccaa661..8d5220a 100644 --- a/tubelib_addons3/teleporter.lua +++ b/tubelib_addons3/teleporter.lua @@ -75,4 +75,5 @@ minetest.register_craft({ }, }) -Tube:add_secondary_node_names({"tubelib_addons3:teleporter"}, {B=false, R=true, F=false, L=false, D=false, U=false}) +Tube:add_secondary_node_names({"tubelib_addons3:teleporter"}) +Tube:set_valid_sides("tubelib_addons3:teleporter", {"R"})