diff options
author | Jeija <norrepli@gmail.com> | 2014-01-05 01:01:53 -0800 |
---|---|---|
committer | Jeija <norrepli@gmail.com> | 2014-01-05 01:01:53 -0800 |
commit | 39361fb7192e8746927a3bd080a24bd0a89fa3ee (patch) | |
tree | 8c7ae38e6426370529f2811d3b8cb430e99f96cd | |
parent | fb417d45a7e44f4b177eb0c19235d4ce0f8c251b (diff) | |
parent | 9c2a5c313c9e149d1031f29a1ff0d245a9093a9b (diff) |
Merge pull request #133 from Novatux/master
Use swap_node instead of add_node when replacing conductors.
-rw-r--r-- | mesecons/internal.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesecons/internal.lua b/mesecons/internal.lua index de91b92..cb77f5d 100644 --- a/mesecons/internal.lua +++ b/mesecons/internal.lua @@ -425,7 +425,7 @@ function mesecon:turnon(pos, rulename) return end - minetest.add_node(pos, {name = mesecon:get_conductor_on(node, rulename), param2 = node.param2}) + minetest.swap_node(pos, {name = mesecon:get_conductor_on(node, rulename), param2 = node.param2}) for _, rule in ipairs(mesecon:rule2meta(rulename, rules)) do local np = mesecon:addPosRule(pos, rule) @@ -458,7 +458,7 @@ function mesecon:turnoff(pos, rulename) return end --]] - minetest.add_node(pos, {name = mesecon:get_conductor_off(node, rulename), param2 = node.param2}) + minetest.swap_node(pos, {name = mesecon:get_conductor_off(node, rulename), param2 = node.param2}) for _, rule in ipairs(mesecon:rule2meta(rulename, rules)) do local np = mesecon:addPosRule(pos, rule) |