diff options
author | Uberi <azhang9@gmail.com> | 2013-11-30 22:13:00 -0500 |
---|---|---|
committer | Uberi <azhang9@gmail.com> | 2013-11-30 22:13:00 -0500 |
commit | 16b4b79c51719849588c49d1d47d9bcbc05533e4 (patch) | |
tree | 0554bf1fb3c1b293af4396cff9aac172e83bb727 /mesecons_solarpanel/init.lua | |
parent | b4654cedb77b435857649e01545bb9e507ff6dae (diff) |
Update code to standards of Minetest 0.4.8.
Diffstat (limited to 'mesecons_solarpanel/init.lua')
-rw-r--r-- | mesecons_solarpanel/init.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mesecons_solarpanel/init.lua b/mesecons_solarpanel/init.lua index 680b568..c30fe12 100644 --- a/mesecons_solarpanel/init.lua +++ b/mesecons_solarpanel/init.lua @@ -71,10 +71,10 @@ minetest.register_abm( interval = 1, chance = 1, action = function(pos, node, active_object_count, active_object_count_wider) - local light = minetest.env:get_node_light(pos, nil) + local light = minetest.get_node_light(pos, nil) if light >= 12 then - minetest.env:set_node(pos, {name="mesecons_solarpanel:solar_panel_on", param2=node.param2}) + minetest.set_node(pos, {name="mesecons_solarpanel:solar_panel_on", param2=node.param2}) mesecon:receptor_on(pos) end end, @@ -85,10 +85,10 @@ minetest.register_abm( interval = 1, chance = 1, action = function(pos, node, active_object_count, active_object_count_wider) - local light = minetest.env:get_node_light(pos, nil) + local light = minetest.get_node_light(pos, nil) if light < 12 then - minetest.env:set_node(pos, {name="mesecons_solarpanel:solar_panel_off", param2=node.param2}) + minetest.set_node(pos, {name="mesecons_solarpanel:solar_panel_off", param2=node.param2}) mesecon:receptor_off(pos) end end, |