diff options
author | Anthony Zhang <azhang9@gmail.com> | 2013-06-22 15:39:01 -0400 |
---|---|---|
committer | Anthony Zhang <azhang9@gmail.com> | 2013-06-22 15:39:01 -0400 |
commit | ec63bd3abfdca2a77b7945834a9b37f7533a4e27 (patch) | |
tree | 42cb7c50e5e0197a0bf671e1176ecf489097c854 /mesecons_mvps/init.lua | |
parent | 4f2604e01bce9bca71105ad6822fd9d98d6511f9 (diff) | |
parent | d15e3eedb0f9a4d184afa1a5c712dec44c99738b (diff) |
Merge remote-tracking branch 'refs/remotes/origin/master'
Diffstat (limited to 'mesecons_mvps/init.lua')
-rw-r--r-- | mesecons_mvps/init.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mesecons_mvps/init.lua b/mesecons_mvps/init.lua index 1176121..91fb345 100644 --- a/mesecons_mvps/init.lua +++ b/mesecons_mvps/init.lua @@ -93,6 +93,11 @@ function mesecon:mvps_push(pos, dir, maximum) -- pos: pos of mvps; dir: directio for i in ipairs(nodes) do nodes[i].pos = mesecon:addPosRule(nodes[i].pos, dir) end + + for _, n in ipairs(nodes) do + mesecon.on_placenode(n.pos, n.node) + mesecon:update_autoconnect(n.pos) + end return true, nodes, oldstack end @@ -112,6 +117,8 @@ function mesecon:mvps_pull_single(pos, dir) -- pos: pos of mvps; direction: dire nodeupdate(pos) mesecon.on_dignode(np, nn) mesecon:update_autoconnect(np) + mesecon:update_autoconnect(pos) + mesecon.on_placenode(pos, nn) end return {{pos = np, node = {param2 = 0, name = "air"}}, {pos = pos, node = nn}} end |