diff options
author | DS <vorunbekannt75@web.de> | 2017-10-08 01:39:02 +0200 |
---|---|---|
committer | Vitaliy <silverunicorn2011@yandex.ru> | 2017-10-08 02:39:02 +0300 |
commit | 37eb7f00e855ed56a2fe512abc5d4e62119d3dc6 (patch) | |
tree | 0611e285eebbfd96e71d54a6db1406b80b6db8fc /mesecons_lamp | |
parent | 905260c8db2d7d4844e3955fa38a79da233b3ab7 (diff) |
Improve rules and rule handling (#370)
Diffstat (limited to 'mesecons_lamp')
-rw-r--r-- | mesecons_lamp/init.lua | 14 |
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, }) |