diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2015-02-07 02:45:17 -0500 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2015-02-07 02:45:17 -0500 |
commit | 364633d884fa2420ab13f5444e06fb418e61d5c2 (patch) | |
tree | 113239b12b575367cb918f433d985d2e6138eb23 /tube_registration.lua | |
parent | e33b662274982bf6be8213975675407633d5d92e (diff) |
make all tubes call the routing functions
using their after_place/after_dig callbacks
Diffstat (limited to 'tube_registration.lua')
-rw-r--r-- | tube_registration.lua | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/tube_registration.lua b/tube_registration.lua index d37bf7d..c926216 100644 --- a/tube_registration.lua +++ b/tube_registration.lua @@ -106,18 +106,8 @@ local register_one_tube = function(name, tname, dropname, desc, plain, noctrs, e connect_sides = {front = 1, back = 1, left = 1, right = 1, top = 1, bottom = 1}, priority = 50 }, - --[[after_place_node = function(pos) - pipeworks.scan_for_tube_objects(pos) - if minetest.registered_nodes[rname].after_place_node_ then - minetest.registered_nodes[rname].after_place_node_(pos) - end - end, - after_dig_node = function(pos) - pipeworks.scan_for_tube_objects(pos) - if minetest.registered_nodes[rname].after_dig_node_ then - minetest.registered_nodes[rname].after_dig_node_(pos) - end - end]] + after_place_node = pipeworks.after_place, + after_dig_node = pipeworks.after_dig } if style == "6d" then nodedef.paramtype2 = "facedir" @@ -196,12 +186,7 @@ local register_all_tubes = function(name, desc, plain, noctrs, ends, short, inv, paramtype = "light", sunlight_propagates = true, description = "Pneumatic tube segment (legacy)", - --[[after_place_node = function(pos) - pipeworks.scan_for_tube_objects(pos) - if minetest.registered_nodes[name.."_1"].after_place_node_ then - minetest.registered_nodes[name.."_1"].after_place_node_(pos) - end - end,]] + after_place_node = pipeworks.after_place, groups = {not_in_creative_inventory = 1, tube_to_update = 1, tube = 1}, tube = {connect_sides = {front = 1, back = 1, left = 1, right = 1, top = 1, bottom = 1}}, drop = name.."_1", |