diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2012-08-22 09:56:45 -0400 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2012-08-22 09:56:45 -0400 |
commit | 4597b1b59a3c4ebec7b9e1d8e5a575144280b3b4 (patch) | |
tree | a47a5771ae3b1196d854a9a112a59d20444cbbcf /autoplace.lua | |
parent | 4a1dbe2a8e0a6c4dc19c42a45cd9ca54a197403a (diff) |
Added "expansion tank" that appears if the user stacks tanks upwards.
(Downwards is not checked).
Diffstat (limited to 'autoplace.lua')
-rw-r--r-- | autoplace.lua | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/autoplace.lua b/autoplace.lua index b615b64..2f7c7f1 100644 --- a/autoplace.lua +++ b/autoplace.lua @@ -106,16 +106,18 @@ pipes_scansurroundings = function(pos) -- also, so they require a special case if (string.find(nym.name, "pipeworks:storage_tank_") ~= nil) or - (string.find(nym.name, "pipeworks:storage_tank_") ~= nil) or (string.find(nym.name, "pipeworks:intake") ~= nil) or (string.find(nym.name, "pipeworks:outlet") ~= nil) then pym=1 end +end - if (string.find(nyp.name, "pipeworks:storage_tank_") ~= nil) or - (string.find(nyp.name, "pipeworks:storage_tank_") ~= nil) then - pyp=1 - end +function pipe_look_for_stackable_tanks(pos) + tym = minetest.env:get_node({ x=pos.x , y=pos.y-1, z=pos.z }) + if string.find(tym.name, "pipeworks:storage_tank_") ~= nil or + string.find(tym.name, "pipeworks:expansion_tank_") ~= nil then + minetest.env:add_node(pos, { name = "pipeworks:expansion_tank_0"}) + end end |