Added outlet grate, made it participate in autoplace algorithm.

This commit is contained in:
Vanessa Ezekowitz 2012-08-22 03:43:38 -04:00
parent bb168e75e4
commit a66d9a8564
5 changed files with 43 additions and 1 deletions

View File

@ -107,7 +107,8 @@ pipes_scansurroundings = function(pos)
if (string.find(nym.name, "pipeworks:storage_tank_x") ~= nil) or 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:storage_tank_z") ~= nil) or
(string.find(nym.name, "pipeworks:intake") ~= nil) then (string.find(nym.name, "pipeworks:intake") ~= nil) or
(string.find(nym.name, "pipeworks:outlet") ~= nil) then
pym=1 pym=1
end end

View File

@ -1,6 +1,8 @@
Changelog Changelog
--------- ---------
2012-08-22: Added outlet grate, made it participate in autoplace algorithm.
2012-08-21: Made storage tank participate in autoplace algorithm. Tuned API a 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 little to allow for more flexible placement. Re-organized code a bit to allow
for some upcoming rules changes. Made storage tanks' upper/lower fittins and for some upcoming rules changes. Made storage tanks' upper/lower fittins and

View File

@ -279,6 +279,45 @@ minetest.register_node("pipeworks:intake", {
end, end,
}) })
-- outlet grate
minetest.register_node("pipeworks:outlet", {
description = "Outlet grate",
drawtype = "nodebox",
tiles = {
"pipeworks_outlet_top.png",
"pipeworks_outlet_sides.png",
"pipeworks_outlet_sides.png",
"pipeworks_outlet_sides.png",
"pipeworks_outlet_sides.png",
"pipeworks_outlet_sides.png"
},
selection_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
},
node_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
},
paramtype = "light",
groups = {snappy=3, pipe=1},
sounds = default.node_sound_wood_defaults(),
walkable = true,
stack_max = 99,
after_place_node = function(pos)
pipe_scanforobjects(pos)
end,
after_dig_node = function(pos)
pipe_scanforobjects(pos)
end,
pipelike=1,
on_construct = function(pos)
local meta = minetest.env:get_meta(pos)
meta:set_int("pipelike",1)
end,
})
-- tank -- tank
minetest.register_node("pipeworks:storage_tank_x", { minetest.register_node("pipeworks:storage_tank_x", {

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB