diff options
author | Jeija <norrepli@gmail.com> | 2016-02-14 21:00:37 +0100 |
---|---|---|
committer | Jeija <norrepli@gmail.com> | 2016-02-14 21:00:37 +0100 |
commit | 7865d428348e64b4aa2877830fd97a283b0ae44e (patch) | |
tree | 20642b272930ab2d94042a800b9015dac6581715 /mesecons_pistons | |
parent | 809192f353af2faeb779df85104d4d7ed8d8943d (diff) |
Always use minetest.set_node instead of minetest.add_node for consistency
Diffstat (limited to 'mesecons_pistons')
-rw-r--r-- | mesecons_pistons/init.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mesecons_pistons/init.lua b/mesecons_pistons/init.lua index 5bf380c..49710d3 100644 --- a/mesecons_pistons/init.lua +++ b/mesecons_pistons/init.lua @@ -82,8 +82,8 @@ local piston_on = function(pos, node) local maxpush = mesecon.setting("piston_max_push", 15) local success, stack, oldstack = mesecon.mvps_push(np, dir, maxpush) if success then - minetest.add_node(pos, {param2 = node.param2, name = pistonspec.onname}) - minetest.add_node(np, {param2 = node.param2, name = pistonspec.pusher}) + minetest.set_node(pos, {param2 = node.param2, name = pistonspec.onname}) + minetest.set_node(np, {param2 = node.param2, name = pistonspec.pusher}) minetest.sound_play("piston_extend", { pos = pos, max_hear_distance = 20, @@ -96,7 +96,7 @@ end local piston_off = function(pos, node) local pistonspec = minetest.registered_nodes[node.name].mesecons_piston - minetest.add_node(pos, {param2 = node.param2, name = pistonspec.offname}) + minetest.set_node(pos, {param2 = node.param2, name = pistonspec.offname}) piston_remove_pusher(pos, node) if pistonspec.sticky then @@ -118,9 +118,9 @@ local piston_orientate = function(pos, placer) local node = minetest.get_node(pos) local pistonspec = minetest.registered_nodes[node.name].mesecons_piston if pitch > 55 then --looking upwards - minetest.add_node(pos, {name=pistonspec.piston_down}) + minetest.set_node(pos, {name=pistonspec.piston_down}) elseif pitch < -55 then --looking downwards - minetest.add_node(pos, {name=pistonspec.piston_up}) + minetest.set_node(pos, {name=pistonspec.piston_up}) end end |