mirror of
https://github.com/joe7575/techpack.git
synced 2024-11-29 10:33:47 +01:00
Even newer way of defining valid sides
This commit is contained in:
parent
15557e6dc4
commit
dab766b30d
@ -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
|
||||
|
@ -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"})
|
||||
|
Loading…
Reference in New Issue
Block a user