Added "expansion tank" that appears if the user stacks tanks upwards.

(Downwards is not checked).
This commit is contained in:
Vanessa Ezekowitz
2012-08-22 09:56:45 -04:00
parent 4a1dbe2a8e
commit 4597b1b59a
3 changed files with 56 additions and 14 deletions

View File

@ -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
if (string.find(nyp.name, "pipeworks:storage_tank_") ~= nil) or
(string.find(nyp.name, "pipeworks:storage_tank_") ~= nil) then
pyp=1
end
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