Whoops, tubes ought to connect to deployers!
authorAnthony Zhang <azhang9@gmail.com>
Sun, 23 Jun 2013 23:52:01 +0000 (19:52 -0400)
committerAnthony Zhang <azhang9@gmail.com>
Sun, 23 Jun 2013 23:52:01 +0000 (19:52 -0400)
compat.lua
deployer.lua
node_breaker.lua

index 9caee895e8497292eafdbda02ad64764fbe6cb23..6f555d061374d65d5d13057932f56262e4efc63b 100644 (file)
@@ -88,10 +88,6 @@ chest.tube={insert_object=function(pos,node,stack,direction)
                        return inv:room_for_item("main",stack)
                end,
                input_inventory="main"}
-chest.after_place_node = function(pos)
-                               tube_scanforobjects(pos)
-                       end
-chest.after_dig_node = function(pos)
-                               tube_scanforobjects(pos)
-                       end
+chest.after_place_node = tube_scanforobjects(pos)
+chest.after_dig_node = tube_scanforobjects
 minetest.register_node(":default:chest",chest)
index 7622b5211d42f3d903346d6097b41e4a39f26bf2..0a1cb0a098e1a0a5c3b88d7eb5692ff3a0f83e53 100644 (file)
@@ -106,13 +106,13 @@ minetest.register_node("pipeworks:deployer_off", {
                local inv = meta:get_inventory()
                inv:set_size("main", 3*3)
        end,
-
        can_dig = function(pos,player)
                local meta = minetest.env:get_meta(pos);
                local inv = meta:get_inventory()
                return inv:is_empty("main")
        end,
-       
+       after_place_node = tube_scanforobjects,
+       after_dig_node = tube_scanforobjects,
 })
 
 minetest.register_node("pipeworks:deployer_on", {
@@ -152,4 +152,6 @@ minetest.register_node("pipeworks:deployer_on", {
                local inv = meta:get_inventory()
                return inv:is_empty("main")
        end,
+       after_place_node = tube_scanforobjects,
+       after_dig_node = tube_scanforobjects,
 })
index 105f431d6fe3061cca35c7d8d74fdc9fbd505d2e..cda2692f662e44a3ecc4c55c61cfbcd58d079370 100644 (file)
@@ -93,10 +93,8 @@ minetest.register_node("pipeworks:nodebreaker_off", {
        groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, mesecon = 2,tubedevice=1},
        mesecons= {effector={action_on=node_breaker_on, action_off=node_breaker_off}},
        sounds = default.node_sound_stone_defaults(),
-       on_construct = function(pos)
-       local meta = minetest.env:get_meta(pos)
-       end,
-       
+       after_place_node = tube_scanforobjects,
+       after_dig_node = tube_scanforobjects,
 })
 
 minetest.register_node("pipeworks:nodebreaker_on", {
@@ -108,4 +106,6 @@ minetest.register_node("pipeworks:nodebreaker_on", {
        paramtype2 = "facedir",
        groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, mesecon = 2,tubedevice=1,not_in_creative_inventory=1},
        sounds = default.node_sound_stone_defaults(),
+       after_place_node = tube_scanforobjects,
+       after_dig_node = tube_scanforobjects,
 })
\ No newline at end of file