summaryrefslogtreecommitdiff
path: root/mesecons_hydroturbine
diff options
context:
space:
mode:
authorJeija <norrepli@gmail.com>2016-02-14 21:00:37 +0100
committerJeija <norrepli@gmail.com>2016-02-14 21:00:37 +0100
commit7865d428348e64b4aa2877830fd97a283b0ae44e (patch)
tree20642b272930ab2d94042a800b9015dac6581715 /mesecons_hydroturbine
parent809192f353af2faeb779df85104d4d7ed8d8943d (diff)
downloadmesecons-7865d428348e64b4aa2877830fd97a283b0ae44e.tar
mesecons-7865d428348e64b4aa2877830fd97a283b0ae44e.tar.gz
mesecons-7865d428348e64b4aa2877830fd97a283b0ae44e.tar.bz2
mesecons-7865d428348e64b4aa2877830fd97a283b0ae44e.tar.xz
mesecons-7865d428348e64b4aa2877830fd97a283b0ae44e.zip
Always use minetest.set_node instead of minetest.add_node for consistency
Diffstat (limited to 'mesecons_hydroturbine')
-rw-r--r--mesecons_hydroturbine/init.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesecons_hydroturbine/init.lua b/mesecons_hydroturbine/init.lua
index d1c08f7..f1292e9 100644
--- a/mesecons_hydroturbine/init.lua
+++ b/mesecons_hydroturbine/init.lua
@@ -60,7 +60,7 @@ nodenames = {"mesecons_hydroturbine:hydro_turbine_off"},
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.get_node(waterpos).name=="default:water_flowing" then
- minetest.add_node(pos, {name="mesecons_hydroturbine:hydro_turbine_on"})
+ minetest.set_node(pos, {name="mesecons_hydroturbine:hydro_turbine_on"})
nodeupdate(pos)
mesecon.receptor_on(pos)
end
@@ -74,7 +74,7 @@ nodenames = {"mesecons_hydroturbine:hydro_turbine_on"},
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.get_node(waterpos).name~="default:water_flowing" then
- minetest.add_node(pos, {name="mesecons_hydroturbine:hydro_turbine_off"})
+ minetest.set_node(pos, {name="mesecons_hydroturbine:hydro_turbine_off"})
nodeupdate(pos)
mesecon.receptor_off(pos)
end