diff options
Diffstat (limited to 'mesecons_lamp')
-rw-r--r-- | mesecons_lamp/init.lua | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/mesecons_lamp/init.lua b/mesecons_lamp/init.lua index 6f38b27..a5459c3 100644 --- a/mesecons_lamp/init.lua +++ b/mesecons_lamp/init.lua @@ -17,17 +17,19 @@ 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, }) minetest.register_node("mesecons_lamp:lamp_off", { @@ -42,13 +44,15 @@ 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, }) minetest.register_craft({ |