summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2012-08-22 03:43:38 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2012-08-22 03:43:38 -0400
commita66d9a85642e93c1ad5f758924a8404028c3fd90 (patch)
tree6a5fe8ca3368db6f0df2ea706715b330f102a980
parentbb168e75e4f29aa65490f5b44b0b32c85185c918 (diff)
downloadpipeworks-a66d9a85642e93c1ad5f758924a8404028c3fd90.tar
pipeworks-a66d9a85642e93c1ad5f758924a8404028c3fd90.tar.gz
pipeworks-a66d9a85642e93c1ad5f758924a8404028c3fd90.tar.bz2
pipeworks-a66d9a85642e93c1ad5f758924a8404028c3fd90.tar.xz
pipeworks-a66d9a85642e93c1ad5f758924a8404028c3fd90.zip
Added outlet grate, made it participate in autoplace algorithm.
-rw-r--r--autoplace.lua3
-rw-r--r--changelog.txt2
-rw-r--r--devices.lua39
-rw-r--r--textures/pipeworks_outlet_sides.pngbin0 -> 6075 bytes
-rw-r--r--textures/pipeworks_outlet_top.pngbin0 -> 6503 bytes
5 files changed, 43 insertions, 1 deletions
diff --git a/autoplace.lua b/autoplace.lua
index 06e6978..94a8620 100644
--- a/autoplace.lua
+++ b/autoplace.lua
@@ -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
diff --git a/changelog.txt b/changelog.txt
index c18214f..2d882c2 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -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
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", {
diff --git a/textures/pipeworks_outlet_sides.png b/textures/pipeworks_outlet_sides.png
new file mode 100644
index 0000000..12c79c7
--- /dev/null
+++ b/textures/pipeworks_outlet_sides.png
Binary files differ
diff --git a/textures/pipeworks_outlet_top.png b/textures/pipeworks_outlet_top.png
new file mode 100644
index 0000000..72f7ecc
--- /dev/null
+++ b/textures/pipeworks_outlet_top.png
Binary files differ