summaryrefslogtreecommitdiff
path: root/autoplace.lua
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2012-08-21 14:49:17 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2012-08-21 14:49:17 -0400
commitbb168e75e4f29aa65490f5b44b0b32c85185c918 (patch)
treee06334353f0be76671a208f649c256e88007bf77 /autoplace.lua
parent3ddb75217c3b2bfce75eca726f60c7fd6d091f98 (diff)
downloadpipeworks-bb168e75e4f29aa65490f5b44b0b32c85185c918.tar
pipeworks-bb168e75e4f29aa65490f5b44b0b32c85185c918.tar.gz
pipeworks-bb168e75e4f29aa65490f5b44b0b32c85185c918.tar.bz2
pipeworks-bb168e75e4f29aa65490f5b44b0b32c85185c918.tar.xz
pipeworks-bb168e75e4f29aa65490f5b44b0b32c85185c918.zip
made storage tanks' upper/lower fittings and intake grate fitting participate
in pipe autoplace algorithm
Diffstat (limited to 'autoplace.lua')
-rw-r--r--autoplace.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/autoplace.lua b/autoplace.lua
index bc149ce..06e6978 100644
--- a/autoplace.lua
+++ b/autoplace.lua
@@ -101,5 +101,20 @@ pipes_scansurroundings = function(pos)
pzp=1
end
end
+
+ -- storage tanks and intake grates have vertical connections
+ -- also, so they require a special case
+
+ if (string.find(nym.name, "pipeworks:storage_tank_x") ~= nil) or
+ (string.find(nym.name, "pipeworks:storage_tank_z") ~= nil) or
+ (string.find(nym.name, "pipeworks:intake") ~= nil) then
+ pym=1
+ end
+
+ if (string.find(nyp.name, "pipeworks:storage_tank_x") ~= nil) or
+ (string.find(nyp.name, "pipeworks:storage_tank_z") ~= nil) then
+ pyp=1
+ end
+
end