diff options
author | Christopher Head <chead@chead.ca> | 2016-08-20 21:54:15 -0700 |
---|---|---|
committer | Christopher Head <chead@chead.ca> | 2016-08-24 00:42:40 -0700 |
commit | bc9d4c2d5a1d535f4abc001d527cc65c78227016 (patch) | |
tree | 1b085f38d9ea227bd9b8ef11abcc1820b2d3280b /mesecons/internal.lua | |
parent | 6d79272ed4966b63e2035b19af07d13f2a0be2a3 (diff) | |
download | mesecons-bc9d4c2d5a1d535f4abc001d527cc65c78227016.tar mesecons-bc9d4c2d5a1d535f4abc001d527cc65c78227016.tar.gz mesecons-bc9d4c2d5a1d535f4abc001d527cc65c78227016.tar.bz2 mesecons-bc9d4c2d5a1d535f4abc001d527cc65c78227016.tar.xz mesecons-bc9d4c2d5a1d535f4abc001d527cc65c78227016.zip |
Use VM transactions for conductor state changes.
VoxelManipulator-based transactions are used to hopefully speed up
scanning and replacing of networks of conductors when receptors start or
stop driving signals into them.
Diffstat (limited to 'mesecons/internal.lua')
-rw-r--r-- | mesecons/internal.lua | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mesecons/internal.lua b/mesecons/internal.lua index 4ef2b18..e11de4f 100644 --- a/mesecons/internal.lua +++ b/mesecons/internal.lua @@ -405,8 +405,7 @@ function mesecon.turnon(pos, link) end if success then - minetest.swap_node(f.pos, {name = mesecon.get_conductor_on(node, f.link), - param2 = node.param2}) + mesecon.swap_node_force(f.pos, mesecon.get_conductor_on(node, f.link)) for npos, links in pairs(neighborlinks) do -- links = all links to node, l = each single link @@ -465,8 +464,7 @@ function mesecon.turnoff(pos, link) end if success then - minetest.swap_node(f.pos, {name = mesecon.get_conductor_off(node, f.link), - param2 = node.param2}) + mesecon.swap_node_force(f.pos, mesecon.get_conductor_off(node, f.link)) for npos, links in pairs(neighborlinks) do -- links = all links to node, l = each single link |