summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2013-01-05 21:14:09 -0500
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2013-01-05 21:14:09 -0500
commit14102d7c3ad8f7e4aef271294a74c28e7e851bc2 (patch)
tree19f6e2171213d29273202b00acd6b5970db7a83f /init.lua
parent0a1f90c391dcc4907665e1211c666310d36a740b (diff)
downloadpipeworks-14102d7c3ad8f7e4aef271294a74c28e7e851bc2.tar
pipeworks-14102d7c3ad8f7e4aef271294a74c28e7e851bc2.tar.gz
pipeworks-14102d7c3ad8f7e4aef271294a74c28e7e851bc2.tar.bz2
pipeworks-14102d7c3ad8f7e4aef271294a74c28e7e851bc2.tar.xz
pipeworks-14102d7c3ad8f7e4aef271294a74c28e7e851bc2.zip
made storage tanks connect from top/bottom, made storage tank and pipe
textures use the ^ combine operator so they can show the actual liquid going through the pipes/tanks.
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua22
1 files changed, 12 insertions, 10 deletions
diff --git a/init.lua b/init.lua
index d7da236..977c4a9 100644
--- a/init.lua
+++ b/init.lua
@@ -15,6 +15,8 @@
minetest.register_alias("pipeworks:pipe", "pipeworks:pipe_110000_empty")
local DEBUG = true
+pipeworks_liquid_texture = "default_water.png"
+
pipe_leftstub = {
{ -32/64, -2/64, -6/64, 1/64, 2/64, 6/64 }, -- pipe segment against -X face
{ -32/64, -4/64, -5/64, 1/64, 4/64, 5/64 },
@@ -198,27 +200,27 @@ for zp = 0, 1 do
if (jx+jy+jz) == 1 then
if xm == 1 then
table.remove(outimgs, 3)
- table.insert(outimgs, 3, "pipeworks_pipe_end_XXXXX.png")
+ table.insert(outimgs, 3, "^pipeworks_plain.png")
end
if xp == 1 then
table.remove(outimgs, 4)
- table.insert(outimgs, 4, "pipeworks_pipe_end_XXXXX.png")
+ table.insert(outimgs, 4, "^pipeworks_plain.png")
end
if ym == 1 then
table.remove(outimgs, 1)
- table.insert(outimgs, 1, "pipeworks_pipe_end_XXXXX.png")
+ table.insert(outimgs, 1, "^pipeworks_plain.png")
end
if xp == 1 then
table.remove(outimgs, 2)
- table.insert(outimgs, 2, "pipeworks_pipe_end_XXXXX.png")
+ table.insert(outimgs, 2, "^pipeworks_plain.png")
end
if zm == 1 then
table.remove(outimgs, 5)
- table.insert(outimgs, 5, "pipeworks_pipe_end_XXXXX.png")
+ table.insert(outimgs, 5, "^pipeworks_plain.png")
end
if zp == 1 then
table.remove(outimgs, 6)
- table.insert(outimgs, 6, "pipeworks_pipe_end_XXXXX.png")
+ table.insert(outimgs, 6, "^pipeworks_plain.png")
end
end
@@ -229,15 +231,15 @@ for zp = 0, 1 do
if (jx==2 and jy~=2 and jz~=2) then
table.remove(outimgs, 5)
table.remove(outimgs, 5)
- table.insert(outimgs, 5, "pipeworks_windowed_XXXXX.png")
- table.insert(outimgs, 5, "pipeworks_windowed_XXXXX.png")
+ table.insert(outimgs, 5, pipeworks_liquid_texture.."^pipeworks_windowed_XXXXX.png")
+ table.insert(outimgs, 5, pipeworks_liquid_texture.."^pipeworks_windowed_XXXXX.png")
end
if (jx~=2 and jy~=2 and jz==2) or (jx~=2 and jy==2 and jz~=2) then
table.remove(outimgs, 3)
table.remove(outimgs, 3)
- table.insert(outimgs, 3, "pipeworks_windowed_XXXXX.png")
- table.insert(outimgs, 3, "pipeworks_windowed_XXXXX.png")
+ table.insert(outimgs, 3, pipeworks_liquid_texture.."^pipeworks_windowed_XXXXX.png")
+ table.insert(outimgs, 3, pipeworks_liquid_texture.."^pipeworks_windowed_XXXXX.png")
end
local pname = xm..xp..ym..yp..zm..zp