summaryrefslogtreecommitdiff
path: root/autoplace_pipes.lua
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-11-03 22:09:25 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-11-03 23:02:36 -0400
commitee0c276900dd6c15fac3ed21247f31982c206053 (patch)
tree672ab43661749bdf88a4ab8c50b53a3d013e6cc9 /autoplace_pipes.lua
parente46e2f8c45975e7a85fd72d034d072af35cf87b7 (diff)
downloadpipeworks-ee0c276900dd6c15fac3ed21247f31982c206053.tar
pipeworks-ee0c276900dd6c15fac3ed21247f31982c206053.tar.gz
pipeworks-ee0c276900dd6c15fac3ed21247f31982c206053.tar.bz2
pipeworks-ee0c276900dd6c15fac3ed21247f31982c206053.tar.xz
pipeworks-ee0c276900dd6c15fac3ed21247f31982c206053.zip
added straight-only pipe
(for situations where one might want to run several closely-spaced parallel pipelines) Also fixed a bug where a pipe "entry panel" would report full of water if a pipe next to it (but not connecting) was also full of water Only tested under "classic" flowing logic mode.
Diffstat (limited to 'autoplace_pipes.lua')
-rw-r--r--autoplace_pipes.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/autoplace_pipes.lua b/autoplace_pipes.lua
index a3f0b65..ec4b27e 100644
--- a/autoplace_pipes.lua
+++ b/autoplace_pipes.lua
@@ -159,6 +159,18 @@ function pipeworks.scan_pipe_surroundings(pos)
pzp = f or pzp
end
+-- ...straight-only pipe...
+
+ local match,a,b,c,d,e,f = pipeworks.get_axis_dir(nodetable, "pipeworks:straight_pipe")
+ if match then
+ pxm = a or pxm
+ pxp = b or pxp
+ pym = c or pym
+ pyp = d or pyp
+ pzm = e or pzm
+ pzp = f or pzp
+ end
+
-- ... other nodes
local def_left = minetest.registered_nodes[nxp.name] -- the node that {pos} is to the left of (not the