summaryrefslogtreecommitdiff
path: root/autoplace.lua
diff options
context:
space:
mode:
authorVanessaE <vanessaezekowitz@gmail.com>2013-07-08 20:40:13 -0700
committerVanessaE <vanessaezekowitz@gmail.com>2013-07-08 20:40:13 -0700
commitf42486f0380a9c8d31d51ab31b786e33d452cbd1 (patch)
tree26b6d53e6ebeb451c2414266162544060dc32764 /autoplace.lua
parent2f843fdd767a71bb51f8d31908ff03399cd97703 (diff)
parent2c89692b4ae886fcaed082e2ede0edc3d38089d7 (diff)
downloadpipeworks-f42486f0380a9c8d31d51ab31b786e33d452cbd1.tar
pipeworks-f42486f0380a9c8d31d51ab31b786e33d452cbd1.tar.gz
pipeworks-f42486f0380a9c8d31d51ab31b786e33d452cbd1.tar.bz2
pipeworks-f42486f0380a9c8d31d51ab31b786e33d452cbd1.tar.xz
pipeworks-f42486f0380a9c8d31d51ab31b786e33d452cbd1.zip
Merge pull request #45 from hdastwb/lockedchest
Locked chest integration
Diffstat (limited to 'autoplace.lua')
-rw-r--r--autoplace.lua45
1 files changed, 44 insertions, 1 deletions
diff --git a/autoplace.lua b/autoplace.lua
index f049665..a15d598 100644
--- a/autoplace.lua
+++ b/autoplace.lua
@@ -218,7 +218,50 @@ function tube_autoroute(pos)
-- does not scan for the front side of the node.
---chests
+--locked chests
+
+ -- check for left/right connects
+
+ if string.find(nxm.name, "default:chest_locked") ~= nil
+ and (nxm.param2 == 0 or nxm.param2 == 2) then
+ pxm=1 end
+ if string.find(nxp.name, "default:chest_locked") ~= nil
+ and (nxp.param2 == 0 or nxp.param2 == 2) then
+ pxp=1 end
+
+ if string.find(nzm.name, "default:chest_locked") ~= nil
+ and (nzm.param2 == 1 or nzm.param2 == 3) then
+ pzm=1 end
+ if string.find(nzp.name, "default:chest_locked") ~= nil
+ and (nzp.param2 == 1 or nzp.param2 == 3) then
+ pzp=1 end
+
+ -- check for backside connects
+
+ if string.find(nxm.name, "default:chest_locked") ~= nil
+ and nxm.param2 == 1 then
+ pxm = 1 end
+
+ if string.find(nxp.name, "default:chest_locked") ~= nil
+ and nxp.param2 == 3 then
+ pxp = 1 end
+
+ if string.find(nzm.name, "default:chest_locked") ~= nil
+ and nzm.param2 == 0 then
+ pzm = 1 end
+
+ if string.find(nzp.name, "default:chest_locked") ~= nil
+ and nzp.param2 == 2 then
+ pzp = 1 end
+
+ -- check for top/bottom connections
+
+ if string.find(nym.name, "default:chest_locked") ~= nil then pym = 1 end
+ if string.find(nyp.name, "default:chest_locked") ~= nil then pyp = 1 end
+
+ -- does not scan for the front side of the node.
+
+--furnaces
-- check for left/right connects