mirror of
https://github.com/mt-mods/pipeworks.git
synced 2024-12-29 17:17:29 +01:00
added a "sealed" entry/exit panel (really just a horizontal pipe with a metal
panel overlayed into the middle). Also, tweaked pipes to always drop the empty ones.
This commit is contained in:
parent
6cca6f9857
commit
1a562d23a8
@ -149,6 +149,28 @@ function pipes_scansurroundings(pos)
|
||||
pzp=1
|
||||
end
|
||||
|
||||
-- ...sealed pipe entry/exit...
|
||||
|
||||
if (string.find(nxm.name, "pipeworks:entry_panel") ~= nil)
|
||||
and (nxm.param2 == 1 or nxm.param2 == 3) then
|
||||
pxm=1
|
||||
end
|
||||
|
||||
if (string.find(nxp.name, "pipeworks:entry_panel") ~= nil)
|
||||
and (nxp.param2 == 1 or nxp.param2 == 3) then
|
||||
pxp=1
|
||||
end
|
||||
|
||||
if (string.find(nzm.name, "pipeworks:entry_panel") ~= nil)
|
||||
and (nzm.param2 == 0 or nzm.param2 == 2) then
|
||||
pzm=1
|
||||
end
|
||||
|
||||
if (string.find(nzp.name, "pipeworks:entry_panel") ~= nil)
|
||||
and (nzp.param2 == 0 or nzp.param2 == 2) then
|
||||
pzp=1
|
||||
end
|
||||
|
||||
-- ...pumps, grates, and storage tanks
|
||||
|
||||
if (string.find(nym.name, "pipeworks:storage_tank_") ~= nil) or
|
||||
|
42
devices.lua
42
devices.lua
@ -213,6 +213,48 @@ minetest.register_node("pipeworks:spigot", {
|
||||
}
|
||||
})
|
||||
|
||||
-- sealed pipe entry/exit (decorative horizontal pipe passing through a metal
|
||||
-- wall, for use in places where walls should look like they're airtight)
|
||||
|
||||
local airtightboxes = {}
|
||||
pipe_addbox(airtightboxes, pipe_frontstub)
|
||||
pipe_addbox(airtightboxes, pipe_backstub)
|
||||
pipe_addbox(airtightboxes, entry_panel)
|
||||
|
||||
minetest.register_node("pipeworks:entry_panel", {
|
||||
description = "Airtight Pipe entry/exit",
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"pipeworks_plain.png",
|
||||
"pipeworks_plain.png",
|
||||
"pipeworks_plain.png",
|
||||
"pipeworks_plain.png",
|
||||
"pipeworks_pipe_end_empty.png",
|
||||
"pipeworks_pipe_end_empty.png"
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
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,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = airtightboxes,
|
||||
},
|
||||
})
|
||||
|
||||
-- tanks
|
||||
|
||||
for fill = 0, 10 do
|
||||
|
6
init.lua
6
init.lua
@ -121,6 +121,10 @@ spigot_bottomstub = {
|
||||
{ -8/64, -16/64, -3/64, 8/64, -14/64, 3/64 }
|
||||
}
|
||||
|
||||
entry_panel = {
|
||||
{ -8/16, -8/16, -1/16, 8/16, 8/16, 1/16 }
|
||||
}
|
||||
|
||||
-- Functions
|
||||
|
||||
dbg = function(s)
|
||||
@ -307,7 +311,7 @@ for zp = 0, 1 do
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
walkable = true,
|
||||
stack_max = 99,
|
||||
drop = "pipeworks:pipe_110000_loaded",
|
||||
drop = "pipeworks:pipe_110000_empty",
|
||||
pipelike=1,
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
|
Loading…
Reference in New Issue
Block a user