made storage tanks connect from top/bottom, made storage tank and pipe
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>
Sun, 6 Jan 2013 02:14:09 +0000 (21:14 -0500)
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>
Sun, 6 Jan 2013 02:14:09 +0000 (21:14 -0500)
textures use the ^ combine operator so they can show the actual liquid going
through the pipes/tanks.

21 files changed:
autoplace.lua
devices.lua
init.lua
textures/pipeworks_pipe_end.png
textures/pipeworks_pipe_end_empty.png
textures/pipeworks_pipe_end_loaded.png
textures/pipeworks_plain.png
textures/pipeworks_storage_tank_back.png
textures/pipeworks_storage_tank_fittings.png
textures/pipeworks_storage_tank_front_1.png
textures/pipeworks_storage_tank_front_10.png
textures/pipeworks_storage_tank_front_2.png
textures/pipeworks_storage_tank_front_3.png
textures/pipeworks_storage_tank_front_4.png
textures/pipeworks_storage_tank_front_5.png
textures/pipeworks_storage_tank_front_6.png
textures/pipeworks_storage_tank_front_7.png
textures/pipeworks_storage_tank_front_8.png
textures/pipeworks_storage_tank_front_9.png
textures/pipeworks_windowed_empty.png
textures/pipeworks_windowed_loaded.png

index 54df02a84f656bd13f4544b792586c9c33d3c382..6ff5b90b213b5845749c7cc19503b284b17e1fda 100644 (file)
@@ -171,14 +171,23 @@ function pipes_scansurroundings(pos)
                pzp=1
        end
 
--- ...pumps, grates, and storage tanks
+-- ...pumps, grates...
 
-       if (string.find(nym.name, "pipeworks:storage_tank_") ~= nil) or
-          (string.find(nym.name, "pipeworks:grating") ~= nil) or
+       if (string.find(nym.name, "pipeworks:grating") ~= nil) or
           (string.find(nym.name, "pipeworks:pump") ~= nil) then
                pym=1
        end
 
+-- ... and storage tanks.
+
+       if (string.find(nym.name, "pipeworks:storage_tank_") ~= nil) then
+               pym=1
+       end
+
+       if (string.find(nyp.name, "pipeworks:storage_tank_") ~= nil) then
+               pyp=1
+       end
+
 -- ...extra devices specified via the function's parameters
 -- ...except that this part is not implemented yet
 --
index 577979e13f5f56aa5d668ad0a72cbd3b676d1921..9d6a6d81f031665c720b3f57b95cc4b248f4eefc 100644 (file)
@@ -291,7 +291,7 @@ for fill = 0, 10 do
                        "pipeworks_storage_tank_back.png",
                        "pipeworks_storage_tank_back.png",
                        "pipeworks_storage_tank_back.png",
-                       "pipeworks_storage_tank_front_"..fill..".png"
+                       pipeworks_liquid_texture.."^pipeworks_storage_tank_front_"..fill..".png"
                },
                paramtype = "light",
                paramtype2 = "facedir",
@@ -316,12 +316,12 @@ for fill = 0, 10 do
        minetest.register_node("pipeworks:storage_tank_"..fill, {
                description = "Fluid Storage Tank ("..filldesc..")",
                tiles = {
+                       "pipeworks_storage_tank_fittings.png",
                        "pipeworks_storage_tank_fittings.png",
                        "pipeworks_storage_tank_back.png",
                        "pipeworks_storage_tank_back.png",
                        "pipeworks_storage_tank_back.png",
-                       "pipeworks_storage_tank_back.png",
-                       "pipeworks_storage_tank_front_"..fill..".png"
+                       pipeworks_liquid_texture.."^pipeworks_storage_tank_front_"..fill..".png"
                },
                paramtype = "light",
                paramtype2 = "facedir",
index d7da2369d27db17046a49d2e9480c33a227211c5..977c4a94a7b7a2dfa0241160ac414ddfba252847 100644 (file)
--- 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
index cb0e4b9b3a2d394586972548b46aaf114ad7a860..4b0f34816c507a3ff328e18fbebfceaa2ba00072 100644 (file)
Binary files a/textures/pipeworks_pipe_end.png and b/textures/pipeworks_pipe_end.png differ
index 400a85bdc8cc5abf87f0839c8902716c1c16a8ac..d09697bad03fdb930a7936ce8780569ed7a36e45 100644 (file)
Binary files a/textures/pipeworks_pipe_end_empty.png and b/textures/pipeworks_pipe_end_empty.png differ
index 5624b834747f5014ecc05c4f75e73796199439c9..49514846af4ddae9038f67c818ada35c9bdbf4e2 100644 (file)
Binary files a/textures/pipeworks_pipe_end_loaded.png and b/textures/pipeworks_pipe_end_loaded.png differ
index 3bd1b6aff4bdd652f81df62b991ac122fafe9a96..736e5a02022370d8acdc04e13e9da75ebd0b0447 100644 (file)
Binary files a/textures/pipeworks_plain.png and b/textures/pipeworks_plain.png differ
index aeecdf99e3accc4ac97d85de8ae570e0fe0ae7da..81f6ffba6f28668067ad035c95609942a4d9412c 100644 (file)
Binary files a/textures/pipeworks_storage_tank_back.png and b/textures/pipeworks_storage_tank_back.png differ
index 2460b86505e6c00f6949170d7897af3223da30bb..5d54de52ffbbee46853a37ddda9303fe55b67d78 100644 (file)
Binary files a/textures/pipeworks_storage_tank_fittings.png and b/textures/pipeworks_storage_tank_fittings.png differ
index cebd8ef57ddebb1dd0b84d11507a5c196546e5c0..606efb57d28d792955c2150129cf882b1cb0905a 100644 (file)
Binary files a/textures/pipeworks_storage_tank_front_1.png and b/textures/pipeworks_storage_tank_front_1.png differ
index 7d1e54e3e23d39a74b044f9eb4fa539cf16712bf..a628d5b563e2cf8e9796a6ae85ede685cdb35ede 100644 (file)
Binary files a/textures/pipeworks_storage_tank_front_10.png and b/textures/pipeworks_storage_tank_front_10.png differ
index 14babe77e58c15277e97d3f7dd0b38bd5428296c..20bb918d9e6801604c593ff067b99b46a65e5fba 100644 (file)
Binary files a/textures/pipeworks_storage_tank_front_2.png and b/textures/pipeworks_storage_tank_front_2.png differ
index f479797b3155674d2bb90520b09c73b9d9550161..038fcbd3ffa86321288f8b5303b5e35133b163dc 100644 (file)
Binary files a/textures/pipeworks_storage_tank_front_3.png and b/textures/pipeworks_storage_tank_front_3.png differ
index 08e1092e27887be1a9ab440138a82837a88c3418..cf0e254ccc017afcb7844d294b84c72c21e0bcc8 100644 (file)
Binary files a/textures/pipeworks_storage_tank_front_4.png and b/textures/pipeworks_storage_tank_front_4.png differ
index 8ba43747b7852440758ac6b764e45fe63e089842..ad5c1e4eeee90047ec4dd1c7299b9d9fe01cd083 100644 (file)
Binary files a/textures/pipeworks_storage_tank_front_5.png and b/textures/pipeworks_storage_tank_front_5.png differ
index 1647011ec51bdafabc0bb96b656fc1500da60ddc..280bdf6dfbace220f1e674aa08eb311ed443c33c 100644 (file)
Binary files a/textures/pipeworks_storage_tank_front_6.png and b/textures/pipeworks_storage_tank_front_6.png differ
index 3ec4f4a3070f35410c33a073f27f5721f688cc51..e3d7522ad7fbe2fc8420885ec5e9544ea2cfb3ad 100644 (file)
Binary files a/textures/pipeworks_storage_tank_front_7.png and b/textures/pipeworks_storage_tank_front_7.png differ
index 0bd0f3f736624fe1ca6595b033dac994a82fdcaf..80c858ad7c22bed048caffc5d6547fc5851b2df8 100644 (file)
Binary files a/textures/pipeworks_storage_tank_front_8.png and b/textures/pipeworks_storage_tank_front_8.png differ
index d24c425e3c814f9b6deb7810659d43d5127a64ee..cbb9993729543516235b36a5bf2c54808111fc41 100644 (file)
Binary files a/textures/pipeworks_storage_tank_front_9.png and b/textures/pipeworks_storage_tank_front_9.png differ
index ebd4486fdc7bcc4a84516db125fbe3e22b8fdb7f..0d5a3dd69ad3b16feaee6c8d76d1c09e376df8fb 100644 (file)
Binary files a/textures/pipeworks_windowed_empty.png and b/textures/pipeworks_windowed_empty.png differ
index 91c4829eb6d1f135c6e91057a492677acdfe5125..fceb7315ee95a9dd048338809b1241009d0f70ad 100644 (file)
Binary files a/textures/pipeworks_windowed_loaded.png and b/textures/pipeworks_windowed_loaded.png differ