Added outlet grate, made it participate in autoplace algorithm.
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>
Wed, 22 Aug 2012 07:43:38 +0000 (03:43 -0400)
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>
Wed, 22 Aug 2012 07:43:38 +0000 (03:43 -0400)
autoplace.lua
changelog.txt
devices.lua
textures/pipeworks_outlet_sides.png [new file with mode: 0644]
textures/pipeworks_outlet_top.png [new file with mode: 0644]

index 06e6978ebb2bee43eda520f7053758daef45e6c1..94a8620e48535eff29c9fd816b93cc37caaf1814 100644 (file)
@@ -107,7 +107,8 @@ pipes_scansurroundings = function(pos)
 
        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:intake") ~= nil) then
+          (string.find(nym.name, "pipeworks:intake") ~= nil) or
+          (string.find(nym.name, "pipeworks:outlet") ~= nil) then
                pym=1
        end
 
index c18214f5d1acdf4e29512423b7fe32cef3b0216e..2d882c28a8a341aa396a0f56ec5338552ceb36e2 100644 (file)
@@ -1,6 +1,8 @@
 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 
 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 
index 9d2578cc0d9d4976e9a56b7b8e086e4dfb1efae8..9eddcf57e1559862ccab873f0bae3b03a57f4976 100644 (file)
@@ -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", {
diff --git a/textures/pipeworks_outlet_sides.png b/textures/pipeworks_outlet_sides.png
new file mode 100644 (file)
index 0000000..12c79c7
Binary files /dev/null and b/textures/pipeworks_outlet_sides.png differ
diff --git a/textures/pipeworks_outlet_top.png b/textures/pipeworks_outlet_top.png
new file mode 100644 (file)
index 0000000..72f7ecc
Binary files /dev/null and b/textures/pipeworks_outlet_top.png differ