From 3a7b9fa31ce872ca15b590bf7f2667aa10ec8646 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Mon, 14 Jan 2013 14:17:07 -0500 Subject: [PATCH] Added a little stub to the bottom of the spigot, showing the water texture, so that when a spigot is flowing, it looks like water is actually pouring out of it. --- devices.lua | 53 +++++++++++++++++++++++++- flowing_logic.lua | 6 ++- textures/pipeworks_spigot_bottom2.png | Bin 0 -> 3389 bytes textures/pipeworks_spigot_sides.png | Bin 3232 -> 338 bytes textures/pipeworks_spigot_sides2.png | Bin 0 -> 267 bytes 5 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 textures/pipeworks_spigot_bottom2.png create mode 100644 textures/pipeworks_spigot_sides2.png diff --git a/devices.lua b/devices.lua index 9d6a6d8..faa1b86 100644 --- a/devices.lua +++ b/devices.lua @@ -48,6 +48,12 @@ spigot_bottomstub = { { -8/64, -16/64, -3/64, 8/64, -14/64, 3/64 } } +spigot_stream = { + { -3/64, -48/64, -5/64, 3/64, -16/64, 5/64 }, + { -4/64, -48/64, -4/64, 4/64, -16/64, 4/64 }, + { -5/64, -48/64, -3/64, 5/64, -16/64, 3/64 } +} + entry_panel = { { -8/16, -8/16, -1/16, 8/16, 8/16, 1/16 } } @@ -194,12 +200,18 @@ minetest.register_node("pipeworks:grating", { pipe_addbox(spigotboxes, spigot_bottomstub) pipe_addbox(spigotboxes, pipe_bendsphere) + local spigotboxes_pouring = {} + pipe_addbox(spigotboxes_pouring, spigot_stream) + pipe_addbox(spigotboxes_pouring, pipe_backstub) + pipe_addbox(spigotboxes_pouring, spigot_bottomstub) + pipe_addbox(spigotboxes_pouring, pipe_bendsphere) + minetest.register_node("pipeworks:spigot", { description = "Spigot outlet", drawtype = "nodebox", tiles = { "pipeworks_spigot_sides.png", - "pipeworks_pipe_end_empty.png", + "pipeworks_spigot_sides.png", "pipeworks_spigot_sides.png", "pipeworks_spigot_sides.png", "pipeworks_pipe_end_empty.png", @@ -231,6 +243,45 @@ minetest.register_node("pipeworks:spigot", { } }) +minetest.register_node("pipeworks:spigot_pouring", { + description = "Spigot outlet", + drawtype = "nodebox", + tiles = { + "pipeworks_spigot_sides.png", + "pipeworks_spigot_sides.png", + "default_water.png^pipeworks_spigot_sides2.png", + "default_water.png^pipeworks_spigot_sides2.png", + "default_water.png^pipeworks_spigot_sides2.png", + "default_water.png^pipeworks_spigot_sides2.png" + }, + paramtype = "light", + paramtype2 = "facedir", + groups = {snappy=3, pipe=1}, + sounds = default.node_sound_wood_defaults(), + walkable = true, + pipelike=1, + on_construct = function(pos) + local meta = minetest.env:get_meta(pos) + meta:set_int("pipelike",1) + end, + after_place_node = function(pos) + pipe_scanforobjects(pos) + end, + after_dig_node = function(pos) + pipe_scanforobjects(pos) + end, + node_box = { + type = "fixed", + fixed = spigotboxes_pouring, + }, + selection_box = { + type = "fixed", + fixed = { -2/16, -6/16, -2/16, 2/16, 2/16, 8/16 } + }, + drop = "pipeworks:spigot", +}) + + -- sealed pipe entry/exit (decorative horizontal pipe passing through a metal -- wall, for use in places where walls should look like they're airtight) diff --git a/flowing_logic.lua b/flowing_logic.lua index d58d124..dffdabf 100644 --- a/flowing_logic.lua +++ b/flowing_logic.lua @@ -79,8 +79,10 @@ local spigot_check = function(pos,node) local top = minetest.env:get_node(check[node.param2+1]).name dbg('found '..top) if string.find(top,'_loaded') then + minetest.env:add_node({x=pos.x,y=pos.y,z=pos.z},{name='pipeworks:spigot_pouring'}) minetest.env:add_node({x=pos.x,y=pos.y-1,z=pos.z},{name='default:water_source'}) elseif minetest.env:get_node({x=pos.x,y=pos.y-1,z=pos.z}).name == 'default:water_source' then + minetest.env:add_node({x=pos.x,y=pos.y,z=pos.z},{name='pipeworks:spigot'}) minetest.env:remove_node({x=pos.x,y=pos.y-1,z=pos.z}) end end @@ -100,11 +102,11 @@ minetest.register_abm({ }) minetest.register_abm({ - nodenames = {'pipeworks:outlet','pipeworks:spigot'}, + nodenames = {'pipeworks:outlet','pipeworks:spigot','pipeworks:spigot_pouring'}, interval = 1, chance = 1, action = function(pos, node, active_object_count, active_object_count_wider) if node.name == 'pipeworks:outlet' then update_outlet(pos) - elseif node.name == 'pipeworks:spigot' then spigot_check(pos,node) end + elseif node.name == 'pipeworks:spigot' or node.name == 'pipeworks:spigot_pouring' then spigot_check(pos,node) end end }) diff --git a/textures/pipeworks_spigot_bottom2.png b/textures/pipeworks_spigot_bottom2.png new file mode 100644 index 0000000000000000000000000000000000000000..3d4435b018cfb9f876294d124460a185515b05ac GIT binary patch literal 3389 zcmV-D4Z`w?P)xwVf#HTWG~g#i|ogbAD&V|YYk?G)*4!CNGYM# zidrjj&ZxD5$8j8Jt&RU%YvbIM683#Z&KbvXz};~i2U1D^fLbe#qr$yk@9xt*_;*~7 zyH9K2^SIXWy#uw?+dcWYyN~<1JCd29)(SJjzV9%zu}J{X?^|ow_Z{vIGn*ElQbNud zW(G6EaUA1bTwrSsu7>BS@OeIebFmb56jn-UTz~8bYOQei_^h>tWar<0ZJN(bDWRAd zN+~#w1KYL@t)-NJE+MqBnEv_W@fbJZ`L)*R0b{YU34X?df^v84`+hC_T&!9d?;9<_?!oHI%(rzs!P#wL>k&}y4L&pD6h z@S5W|hUM@)hXanAJ5VUJ5VZ_$Qtz$nQUR#dC6#Kc6)72NJzxfSYiPBh)`n8b&^|3h zO_rajuXq37CoQU*sV2E7ZhmM`{GVp8KFsHs86dai_q;bZ9{(pM^q-Xu2B8rTI}fpVrJZA&Ur)vo=;E&fZ7_88TS1#X->7FW_ttx?IF6%E+8}B(#?u10`F(#NrHsepF?fXDUjb5uq9Do7 z8HQ;QbQ{$^H^z0v4XY3|MAPbW&M15^O^YXRW7HUZpNmyLO)25nyV=tf^x;aXRPzxJ zxCshs75Xj#&OoVAB8JYK^MpZk0RWu`Fb40(j-1kTb1t6esP_1PqaJ92x~kc@NVOOW zT}@rJsOGQiv$?~?UDPrZ=oIx^Ym*Dm4a(#3z_x90bdxytc~P&guVW#M{k&;6`vdM5 z7*Z3Fa%z-NY*1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&V)bzX7=0XQuMDuxf$J4gK7uDnVY7DW5&tZa;BGApG&u7 zoowt*XQTgX^D-s7okxD67PgIHh>TL0HrEj{hnX)5sn@u?J6dh9WH%s*tm!Iu<T(u{U>z|x`Do60RaC1p>nlL Tal>Np00000NkvXXu0mjfvYMHF literal 0 HcmV?d00001 diff --git a/textures/pipeworks_spigot_sides.png b/textures/pipeworks_spigot_sides.png index e41599f1cb7c9d2684f976cefd97a10f92e94523..ce7d90a2510cf3f323ca3139a1eb5af24f248c94 100644 GIT binary patch delta 317 zcmV-D0mA;E8PWnFiBL{Q4GJ0x0000DNk~Le0000G0000G2m$~A0FaSrHjyD9e-0A^ z8Sd>J_y7O^@kvBMR4C7FkxOm_F$hGJ0gC(Ip)YAZRu00009a7bBm000XU z000XU0RWnu7ytkO2XskIMF-sh0Te6?Qe;vN000a>Nkl34Ip>_SwKnH8Gcy}wWG236CT@s` z`@UOiV~naAV?>0R%{j-IRcU5b#YgZ(-&Iw71;&H{>w4MDsgL7IRpHsH3U{A#y8C_K z?haecjMp>szVE7XcUlt>tu=Rd_b~<@#EUb_%*+bE(mS{ZpRfQP(HTYr?jQG(-_U&Z4ZF!7zC#4myQYb);B0UXO`Lh`Ba%@RTbP% zQ$C*${YQ-QR}6jM&wLO|?rv#%Gkgc*VD}T*IV;y9Ahfs+_`-|J?!Wn0RdbGr$gG)o zrHwHa4-7RBPG*jA*LEtIfYvaw;cluuc05Kvi~-Lph+(2xnIRr( zj7e94NkH~k0a$rwoiK8h(-8)0I+GOF;b8qEW|+2_ZecwG0ES^Qozo>q_R=Rtmeow?90mzzqLWu# z0YXZb3hVtgQ?5LeLPWS(w8qtd_6a0P_fD?WAVx^hVRKHT;3Kya20)s-!+u1(610-Z z!8uGC%B^@1N};yhq*|bS;fi)62N5t>N~T-l6)z)kkr44zL}cE4J;u}&!APK#pv#UF zyQ0p$ZP07}qEzXOFlqtVO~#yKWyWUM_75@QJA+18rJBmFrIP6mitD?pV(E+6C0 znTLnyOXRrB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