From 4597b1b59a3c4ebec7b9e1d8e5a575144280b3b4 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Wed, 22 Aug 2012 09:56:45 -0400 Subject: Added "expansion tank" that appears if the user stacks tanks upwards. (Downwards is not checked). --- autoplace.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'autoplace.lua') 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 -- cgit v1.2.3