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_receiver/init.lua | |
parent | 809192f353af2faeb779df85104d4d7ed8d8943d (diff) |
Always use minetest.set_node instead of minetest.add_node for consistency
Diffstat (limited to 'mesecons_receiver/init.lua')
-rw-r--r-- | mesecons_receiver/init.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mesecons_receiver/init.lua b/mesecons_receiver/init.lua index 4d60365..36f4659 100644 --- a/mesecons_receiver/init.lua +++ b/mesecons_receiver/init.lua @@ -105,10 +105,10 @@ function mesecon.receiver_place(rcpt_pos) if string.find(nn.name, "mesecons:wire_") ~= nil then minetest.dig_node(pos) if mesecon.is_power_on(rcpt_pos) then - minetest.add_node(pos, {name = "mesecons_receiver:receiver_on", param2 = node.param2}) + minetest.set_node(pos, {name = "mesecons_receiver:receiver_on", param2 = node.param2}) mesecon.receptor_on(pos, receiver_get_rules(node)) else - minetest.add_node(pos, {name = "mesecons_receiver:receiver_off", param2 = node.param2}) + minetest.set_node(pos, {name = "mesecons_receiver:receiver_off", param2 = node.param2}) end mesecon.update_autoconnect(pos) end @@ -120,7 +120,7 @@ function mesecon.receiver_remove(rcpt_pos, dugnode) if string.find(nn.name, "mesecons_receiver:receiver_") ~=nil then minetest.dig_node(pos) local node = {name = "mesecons:wire_00000000_off"} - minetest.add_node(pos, node) + minetest.set_node(pos, node) mesecon.update_autoconnect(pos) mesecon.on_placenode(pos, node) end |