From 1a562d23a85568ec111da07411958c09b0b95117 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Tue, 1 Jan 2013 16:30:21 -0500 Subject: 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. --- devices.lua | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'devices.lua') diff --git a/devices.lua b/devices.lua index 513104a..fadba09 100644 --- a/devices.lua +++ b/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 -- cgit v1.2.3