From a66d9a85642e93c1ad5f758924a8404028c3fd90 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Wed, 22 Aug 2012 03:43:38 -0400 Subject: Added outlet grate, made it participate in autoplace algorithm. --- devices.lua | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'devices.lua') diff --git a/devices.lua b/devices.lua index 9d2578c..9eddcf5 100644 --- a/devices.lua +++ b/devices.lua @@ -279,6 +279,45 @@ minetest.register_node("pipeworks:intake", { 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 minetest.register_node("pipeworks:storage_tank_x", { -- cgit v1.2.3