From: Vanessa Ezekowitz Date: Tue, 21 Aug 2012 18:49:17 +0000 (-0400) Subject: made storage tanks' upper/lower fittings and intake grate fitting participate X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=bb168e75e4f29aa65490f5b44b0b32c85185c918;p=zefram%2Fminetest%2Fpipeworks.git made storage tanks' upper/lower fittings and intake grate fitting participate in pipe autoplace algorithm --- 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 diff --git a/changelog.txt b/changelog.txt index 6969087..c18214f 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,7 +3,8 @@ Changelog 2012-08-21: Made storage tank participate in autoplace algorithm. Tuned API a little to allow for more flexible placement. Re-organized code a bit to allow -for some upcoming rules changes. +for some upcoming rules changes. Made storage tanks' upper/lower fittins and +intake grate participate in autoplace algorithm. 2012-08-20: Added temporary nodes for storage tank and intake grating, but without autoplace.