From: Vanessa Ezekowitz Date: Sun, 6 Jan 2013 02:14:09 +0000 (-0500) Subject: made storage tanks connect from top/bottom, made storage tank and pipe X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=14102d7c3ad8f7e4aef271294a74c28e7e851bc2;p=zefram%2Fminetest%2Fpipeworks.git 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. --- diff --git a/autoplace.lua b/autoplace.lua index 54df02a..6ff5b90 100644 --- a/autoplace.lua +++ b/autoplace.lua @@ -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 -- diff --git a/devices.lua b/devices.lua index 577979e..9d6a6d8 100644 --- a/devices.lua +++ b/devices.lua @@ -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", 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 diff --git a/textures/pipeworks_pipe_end.png b/textures/pipeworks_pipe_end.png index cb0e4b9..4b0f348 100644 Binary files a/textures/pipeworks_pipe_end.png and b/textures/pipeworks_pipe_end.png differ diff --git a/textures/pipeworks_pipe_end_empty.png b/textures/pipeworks_pipe_end_empty.png index 400a85b..d09697b 100644 Binary files a/textures/pipeworks_pipe_end_empty.png and b/textures/pipeworks_pipe_end_empty.png differ diff --git a/textures/pipeworks_pipe_end_loaded.png b/textures/pipeworks_pipe_end_loaded.png index 5624b83..4951484 100644 Binary files a/textures/pipeworks_pipe_end_loaded.png and b/textures/pipeworks_pipe_end_loaded.png differ diff --git a/textures/pipeworks_plain.png b/textures/pipeworks_plain.png index 3bd1b6a..736e5a0 100644 Binary files a/textures/pipeworks_plain.png and b/textures/pipeworks_plain.png differ diff --git a/textures/pipeworks_storage_tank_back.png b/textures/pipeworks_storage_tank_back.png index aeecdf9..81f6ffb 100644 Binary files a/textures/pipeworks_storage_tank_back.png and b/textures/pipeworks_storage_tank_back.png differ diff --git a/textures/pipeworks_storage_tank_fittings.png b/textures/pipeworks_storage_tank_fittings.png index 2460b86..5d54de5 100644 Binary files a/textures/pipeworks_storage_tank_fittings.png and b/textures/pipeworks_storage_tank_fittings.png differ diff --git a/textures/pipeworks_storage_tank_front_1.png b/textures/pipeworks_storage_tank_front_1.png index cebd8ef..606efb5 100644 Binary files a/textures/pipeworks_storage_tank_front_1.png and b/textures/pipeworks_storage_tank_front_1.png differ diff --git a/textures/pipeworks_storage_tank_front_10.png b/textures/pipeworks_storage_tank_front_10.png index 7d1e54e..a628d5b 100644 Binary files a/textures/pipeworks_storage_tank_front_10.png and b/textures/pipeworks_storage_tank_front_10.png differ diff --git a/textures/pipeworks_storage_tank_front_2.png b/textures/pipeworks_storage_tank_front_2.png index 14babe7..20bb918 100644 Binary files a/textures/pipeworks_storage_tank_front_2.png and b/textures/pipeworks_storage_tank_front_2.png differ diff --git a/textures/pipeworks_storage_tank_front_3.png b/textures/pipeworks_storage_tank_front_3.png index f479797..038fcbd 100644 Binary files a/textures/pipeworks_storage_tank_front_3.png and b/textures/pipeworks_storage_tank_front_3.png differ diff --git a/textures/pipeworks_storage_tank_front_4.png b/textures/pipeworks_storage_tank_front_4.png index 08e1092..cf0e254 100644 Binary files a/textures/pipeworks_storage_tank_front_4.png and b/textures/pipeworks_storage_tank_front_4.png differ diff --git a/textures/pipeworks_storage_tank_front_5.png b/textures/pipeworks_storage_tank_front_5.png index 8ba4374..ad5c1e4 100644 Binary files a/textures/pipeworks_storage_tank_front_5.png and b/textures/pipeworks_storage_tank_front_5.png differ diff --git a/textures/pipeworks_storage_tank_front_6.png b/textures/pipeworks_storage_tank_front_6.png index 1647011..280bdf6 100644 Binary files a/textures/pipeworks_storage_tank_front_6.png and b/textures/pipeworks_storage_tank_front_6.png differ diff --git a/textures/pipeworks_storage_tank_front_7.png b/textures/pipeworks_storage_tank_front_7.png index 3ec4f4a..e3d7522 100644 Binary files a/textures/pipeworks_storage_tank_front_7.png and b/textures/pipeworks_storage_tank_front_7.png differ diff --git a/textures/pipeworks_storage_tank_front_8.png b/textures/pipeworks_storage_tank_front_8.png index 0bd0f3f..80c858a 100644 Binary files a/textures/pipeworks_storage_tank_front_8.png and b/textures/pipeworks_storage_tank_front_8.png differ diff --git a/textures/pipeworks_storage_tank_front_9.png b/textures/pipeworks_storage_tank_front_9.png index d24c425..cbb9993 100644 Binary files a/textures/pipeworks_storage_tank_front_9.png and b/textures/pipeworks_storage_tank_front_9.png differ diff --git a/textures/pipeworks_windowed_empty.png b/textures/pipeworks_windowed_empty.png index ebd4486..0d5a3dd 100644 Binary files a/textures/pipeworks_windowed_empty.png and b/textures/pipeworks_windowed_empty.png differ diff --git a/textures/pipeworks_windowed_loaded.png b/textures/pipeworks_windowed_loaded.png index 91c4829..fceb731 100644 Binary files a/textures/pipeworks_windowed_loaded.png and b/textures/pipeworks_windowed_loaded.png differ