summaryrefslogtreecommitdiff
path: root/mesecons_lamp
diff options
context:
space:
mode:
Diffstat (limited to 'mesecons_lamp')
-rw-r--r--mesecons_lamp/init.lua14
1 files changed, 8 insertions, 6 deletions
diff --git a/mesecons_lamp/init.lua b/mesecons_lamp/init.lua
index 15c89ff..a5459c3 100644
--- a/mesecons_lamp/init.lua
+++ b/mesecons_lamp/init.lua
@@ -17,16 +17,17 @@ minetest.register_node("mesecons_lamp:lamp_on", {
legacy_wallmounted = true,
sunlight_propagates = true,
walkable = true,
- light_source = default.LIGHT_MAX,
+ light_source = minetest.LIGHT_MAX,
node_box = mesecon_lamp_box,
selection_box = mesecon_lamp_box,
- groups = {dig_immediate=3,not_in_creative_inventory=1, mesecon_effector_on = 1},
- drop="mesecons_lamp:lamp_off 1",
+ groups = {dig_immediate = 3,not_in_creative_inventory = 1, mesecon_effector_on = 1},
+ drop = "mesecons_lamp:lamp_off 1",
sounds = default.node_sound_glass_defaults(),
mesecons = {effector = {
action_off = function (pos, node)
minetest.swap_node(pos, {name = "mesecons_lamp:lamp_off", param2 = node.param2})
- end
+ end,
+ rules = mesecon.rules.wallmounted_get,
}},
on_blast = mesecon.on_blastnode,
})
@@ -43,12 +44,13 @@ minetest.register_node("mesecons_lamp:lamp_off", {
node_box = mesecon_lamp_box,
selection_box = mesecon_lamp_box,
groups = {dig_immediate=3, mesecon_receptor_off = 1, mesecon_effector_off = 1},
- description="Mesecon Lamp",
+ description = "Mesecon Lamp",
sounds = default.node_sound_glass_defaults(),
mesecons = {effector = {
action_on = function (pos, node)
minetest.swap_node(pos, {name = "mesecons_lamp:lamp_on", param2 = node.param2})
- end
+ end,
+ rules = mesecon.rules.wallmounted_get,
}},
on_blast = mesecon.on_blastnode,
})