Whoops, tubes ought to connect to deployers!

This commit is contained in:
Anthony Zhang 2013-06-23 19:52:01 -04:00
parent df0161f65e
commit 5537257185
3 changed files with 10 additions and 12 deletions

View File

@ -88,10 +88,6 @@ chest.tube={insert_object=function(pos,node,stack,direction)
return inv:room_for_item("main",stack) return inv:room_for_item("main",stack)
end, end,
input_inventory="main"} input_inventory="main"}
chest.after_place_node = function(pos) chest.after_place_node = tube_scanforobjects(pos)
tube_scanforobjects(pos) chest.after_dig_node = tube_scanforobjects
end
chest.after_dig_node = function(pos)
tube_scanforobjects(pos)
end
minetest.register_node(":default:chest",chest) minetest.register_node(":default:chest",chest)

View File

@ -106,13 +106,13 @@ minetest.register_node("pipeworks:deployer_off", {
local inv = meta:get_inventory() local inv = meta:get_inventory()
inv:set_size("main", 3*3) inv:set_size("main", 3*3)
end, end,
can_dig = function(pos,player) can_dig = function(pos,player)
local meta = minetest.env:get_meta(pos); local meta = minetest.env:get_meta(pos);
local inv = meta:get_inventory() local inv = meta:get_inventory()
return inv:is_empty("main") return inv:is_empty("main")
end, end,
after_place_node = tube_scanforobjects,
after_dig_node = tube_scanforobjects,
}) })
minetest.register_node("pipeworks:deployer_on", { minetest.register_node("pipeworks:deployer_on", {
@ -152,4 +152,6 @@ minetest.register_node("pipeworks:deployer_on", {
local inv = meta:get_inventory() local inv = meta:get_inventory()
return inv:is_empty("main") return inv:is_empty("main")
end, end,
after_place_node = tube_scanforobjects,
after_dig_node = tube_scanforobjects,
}) })

View 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}, 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}}, mesecons= {effector={action_on=node_breaker_on, action_off=node_breaker_off}},
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
on_construct = function(pos) after_place_node = tube_scanforobjects,
local meta = minetest.env:get_meta(pos) after_dig_node = tube_scanforobjects,
end,
}) })
minetest.register_node("pipeworks:nodebreaker_on", { minetest.register_node("pipeworks:nodebreaker_on", {
@ -108,4 +106,6 @@ minetest.register_node("pipeworks:nodebreaker_on", {
paramtype2 = "facedir", paramtype2 = "facedir",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, mesecon = 2,tubedevice=1,not_in_creative_inventory=1}, 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(), sounds = default.node_sound_stone_defaults(),
after_place_node = tube_scanforobjects,
after_dig_node = tube_scanforobjects,
}) })