summaryrefslogtreecommitdiff
path: root/mesecons_walllever
diff options
context:
space:
mode:
Diffstat (limited to 'mesecons_walllever')
-rw-r--r--mesecons_walllever/depends.txt2
-rw-r--r--mesecons_walllever/init.lua7
2 files changed, 6 insertions, 3 deletions
diff --git a/mesecons_walllever/depends.txt b/mesecons_walllever/depends.txt
index 52a18df..19c798c 100644
--- a/mesecons_walllever/depends.txt
+++ b/mesecons_walllever/depends.txt
@@ -1,2 +1,2 @@
mesecons
-mesecons_button
+mesecons_receiver
diff --git a/mesecons_walllever/init.lua b/mesecons_walllever/init.lua
index b41e87a..eadd6a4 100644
--- a/mesecons_walllever/init.lua
+++ b/mesecons_walllever/init.lua
@@ -26,8 +26,11 @@ minetest.register_node("mesecons_walllever:wall_lever_off", {
{ -2/16, -1/16, 3/16, 2/16, 1/16, 4/16 }, -- the lever "hinge"
{ -1/16, -8/16, 4/16, 1/16, 0, 6/16 }} -- the lever itself.
},
- groups = {dig_immediate=2, mesecon = 3},
+ groups = {dig_immediate=2, mesecon = 3, mesecon_needs_receiver = 1},
description="Lever",
+ after_place_node = function(pos, placer)
+
+ end,
})
minetest.register_node("mesecons_walllever:wall_lever_on", {
drawtype = "nodebox",
@@ -56,7 +59,7 @@ minetest.register_node("mesecons_walllever:wall_lever_on", {
{ -2/16, -1/16, 3/16, 2/16, 1/16, 4/16 }, -- the lever "hinge"
{ -1/16, 0, 4/16, 1/16, 8/16, 6/16 }} -- the lever itself.
},
- groups = {dig_immediate=2,not_in_creative_inventory=1, mesecon = 3},
+ groups = {dig_immediate=2,not_in_creative_inventory=1, mesecon = 3, mesecon_needs_receiver = 1},
drop = '"mesecons_walllever:wall_lever_off" 1',
description="Lever",
})