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_hydroturbine/init.lua | |
parent | b4654cedb77b435857649e01545bb9e507ff6dae (diff) |
Update code to standards of Minetest 0.4.8.
Diffstat (limited to 'mesecons_hydroturbine/init.lua')
-rw-r--r-- | mesecons_hydroturbine/init.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mesecons_hydroturbine/init.lua b/mesecons_hydroturbine/init.lua index 6a4f86d..ef5ccae 100644 --- a/mesecons_hydroturbine/init.lua +++ b/mesecons_hydroturbine/init.lua @@ -63,8 +63,8 @@ nodenames = {"mesecons_hydroturbine:hydro_turbine_off"}, chance = 1, action = function(pos, node, active_object_count, active_object_count_wider) local waterpos={x=pos.x, y=pos.y+1, z=pos.z} - if minetest.env:get_node(waterpos).name=="default:water_flowing" then - minetest.env:add_node(pos, {name="mesecons_hydroturbine:hydro_turbine_on"}) + if minetest.get_node(waterpos).name=="default:water_flowing" then + minetest.add_node(pos, {name="mesecons_hydroturbine:hydro_turbine_on"}) nodeupdate(pos) mesecon:receptor_on(pos) end @@ -77,8 +77,8 @@ nodenames = {"mesecons_hydroturbine:hydro_turbine_on"}, chance = 1, action = function(pos, node, active_object_count, active_object_count_wider) local waterpos={x=pos.x, y=pos.y+1, z=pos.z} - if minetest.env:get_node(waterpos).name~="default:water_flowing" then - minetest.env:add_node(pos, {name="mesecons_hydroturbine:hydro_turbine_off"}) + if minetest.get_node(waterpos).name~="default:water_flowing" then + minetest.add_node(pos, {name="mesecons_hydroturbine:hydro_turbine_off"}) nodeupdate(pos) mesecon:receptor_off(pos) end |