From 0aebf864d1b57cc8f262da4ffe86b8b248bc4613 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 21 Feb 2015 01:05:19 +0100 Subject: [PATCH] Add gunpowder trails MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Uses group “connect_to_raillike” --- game_api.txt | 2 + mods/tnt/init.lua | 35 ++++++++++++++++-- mods/tnt/textures/tnt_gunpowder.png | Bin 336 -> 0 bytes mods/tnt/textures/tnt_gunpowder_burning.png | Bin 344 -> 0 bytes .../tnt_gunpowder_burning_animated.png | Bin 203 -> 0 bytes ...nt_gunpowder_burning_crossing_animated.png | Bin 0 -> 612 bytes .../tnt_gunpowder_burning_curved_animated.png | Bin 0 -> 432 bytes ...nt_gunpowder_burning_straight_animated.png | Bin 0 -> 461 bytes ..._gunpowder_burning_t_junction_animated.png | Bin 0 -> 672 bytes mods/tnt/textures/tnt_gunpowder_crossing.png | Bin 0 -> 245 bytes mods/tnt/textures/tnt_gunpowder_curved.png | Bin 0 -> 268 bytes mods/tnt/textures/tnt_gunpowder_straight.png | Bin 0 -> 225 bytes .../tnt/textures/tnt_gunpowder_t_junction.png | Bin 0 -> 328 bytes 13 files changed, 33 insertions(+), 4 deletions(-) delete mode 100644 mods/tnt/textures/tnt_gunpowder.png delete mode 100644 mods/tnt/textures/tnt_gunpowder_burning.png delete mode 100644 mods/tnt/textures/tnt_gunpowder_burning_animated.png create mode 100644 mods/tnt/textures/tnt_gunpowder_burning_crossing_animated.png create mode 100644 mods/tnt/textures/tnt_gunpowder_burning_curved_animated.png create mode 100644 mods/tnt/textures/tnt_gunpowder_burning_straight_animated.png create mode 100644 mods/tnt/textures/tnt_gunpowder_burning_t_junction_animated.png create mode 100644 mods/tnt/textures/tnt_gunpowder_crossing.png create mode 100644 mods/tnt/textures/tnt_gunpowder_curved.png create mode 100644 mods/tnt/textures/tnt_gunpowder_straight.png create mode 100644 mods/tnt/textures/tnt_gunpowder_t_junction.png diff --git a/game_api.txt b/game_api.txt index a3edcfe8..791a7f92 100644 --- a/game_api.txt +++ b/game_api.txt @@ -218,6 +218,8 @@ Use `minetest.raillike_group()` to get the group value. | Node type | Raillike group name +-----------------------+---------------------------------- | default:rail | "rail" +| tnt:gunpowder | "gunpowder" +| tnt:gunpowder_burning | "gunpowder" Example: If you want to add a new rail type and want it to connect with default:rail, diff --git a/mods/tnt/init.lua b/mods/tnt/init.lua index 1554bf23..5eab9eb9 100644 --- a/mods/tnt/init.lua +++ b/mods/tnt/init.lua @@ -270,14 +270,14 @@ minetest.register_node("tnt:gunpowder", { paramtype = "light", sunlight_propagates = true, walkable = false, - tiles = {"tnt_gunpowder.png",}, + tiles = {"tnt_gunpowder_straight.png", "tnt_gunpowder_curved.png", "tnt_gunpowder_t_junction.png", "tnt_gunpowder_crossing.png"}, inventory_image = "tnt_gunpowder_inventory.png", wield_image = "tnt_gunpowder_inventory.png", selection_box = { type = "fixed", fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, }, - groups = {dig_immediate=2,attached_node=1}, + groups = {dig_immediate=2,attached_node=1,connect_to_raillike=minetest.raillike_group("gunpowder")}, sounds = default.node_sound_leaves_defaults(), on_punch = function(pos, node, puncher) @@ -297,7 +297,34 @@ minetest.register_node("tnt:gunpowder_burning", { walkable = false, light_source = 5, tiles = {{ - name = "tnt_gunpowder_burning_animated.png", + name = "tnt_gunpowder_burning_straight_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1, + } + }, + { + name = "tnt_gunpowder_burning_curved_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1, + } + }, + { + name = "tnt_gunpowder_burning_t_junction_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1, + } + }, + { + name = "tnt_gunpowder_burning_crossing_animated.png", animation = { type = "vertical_frames", aspect_w = 16, @@ -310,7 +337,7 @@ minetest.register_node("tnt:gunpowder_burning", { fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, }, drop = "", - groups = {dig_immediate=2,attached_node=1}, + groups = {dig_immediate=2,attached_node=1,connect_to_raillike=minetest.raillike_group("gunpowder")}, sounds = default.node_sound_leaves_defaults(), on_timer = function(pos, elapsed) for dx = -1, 1 do diff --git a/mods/tnt/textures/tnt_gunpowder.png b/mods/tnt/textures/tnt_gunpowder.png deleted file mode 100644 index 52153e928db9ce52272dfc971b86576052624ac7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 336 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbK}T7XZ8E07Ki4~}t^$nuuS_L0f= zmn-m>Eeen;3z07mm9GqwuL@VFk5+7mR%(b*YD?DcOx2l~tv@x-U|PQ6tRka1B|v06 zztm(=x#{9c)1_5r%d5@TH(G9Jw%pQYwQKLTJC;Bj7^>&lE&x)BB|&~5oAHAMlQu8` zRaAJoIEF|_vL0-AWM<%DHel7Lp1N1||9=%BqYc+sQu=BtJ{#OCoV7D9obR2v!fqWO z2evDI4=#Usxjk3@DgXAFSGT3-zEilo?G&5Nt!;A;gg@K)_FE|P^O@_mSv8)`=*~;% wy|js2|5^Ljy-zw$pE-K=Q9==uWLe?|{_APHJjW+L4+FW<)78&qol`;+0PO&A!TEeen;3z07mm9GqwuL@VFk5+7mR%(b*YD?DcOx2l~tv@x-U|PQ6tRka1B|v06 zztm(=x#{9c)1_5r%d5@TH(G9Jw%pQYwQKLTJC;Bj819{6*lqWz2gp(^3GxG3jvp+T zw1EkzqSn*JF+@U=^&qPgGXoFH1`&z8!+ZDs`#(|TMU&ww$LkaM^W{!i`|VzLd}{OW z%nQamAh+^%A1wIAvTH`;A^Uq9d8Kdktho(xs;8@;%Q~lo FCID4Fc1i#M diff --git a/mods/tnt/textures/tnt_gunpowder_burning_animated.png b/mods/tnt/textures/tnt_gunpowder_burning_animated.png deleted file mode 100644 index 5ee24840a0212c60051ee154b7719ce7df0de7f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 203 zcmeAS@N?(olHy`uVBq!ia0vp^0zmA*!3-o-7PBt_Qk(%kA+G=b{|7Sfone^Asi_KN zF_r}R1v5B2yO9Ru6nMHghEy<~y=2&TG=Sr1!0q4hU#2iWnyz_otpdwJnO6VDE11uk zhMm0Fc4o<|TMh*>Co=XkzT5rD?atOp+kf(@LdO5TWz^+7`g)^W{;PpxX7!4PUo*bU z{eO7xlvw`wuNzGLHl8iEDf$-6U)b#!U-^e|h6Tf+IR}>&1MOz;boFyt=akR{0Id&E AssI20 diff --git a/mods/tnt/textures/tnt_gunpowder_burning_crossing_animated.png b/mods/tnt/textures/tnt_gunpowder_burning_crossing_animated.png new file mode 100644 index 0000000000000000000000000000000000000000..a901f7bdc200ac079018060d4267d2c12dcd398b GIT binary patch literal 612 zcmV-q0-ODbP)AI z5d?s8T8>pFTW!Da>12)bUc@n5uNExh*x0M0qynWPImXH`N7;N;HQ*uxy*GYaOH50(eT4ZNIz z8W(&pv6=XgAlNUn7;#?a|>qPN1CcPuTiHA-%`+rA)s z@__b6s~&YF7epKwrqMJ4=gZ@}`T*l-tfG+w=riy4^FZc-b1t!FafK(gZJW(H{*D!Q zUH1s_rfF!NXG|mT@oDk>^@HnN2jzs2x7LEUj2a*ZZM3&VlUR-TW2tg%sH4n4`yQ@FY zs&WzwT;AKZrNiNnEb!h_-}lLXv1`)^O3HX#3o|W_w1gl{)-qB{X}%4Ux&IfCh;Q?p zXR7*xKjFdd{y^r!W*%tayom=<8@NyY>K_cFVmN3U7rx4>T9#Q>dyQ#4w2y ytExYc4=k~0od=SUn|bh7e-OW&-r~VpfA9;n;PF(;jD(y30000J!^tCfh^ z`rlh?+3WS%IT(+}&2#VUQFu^3>rfsnb0}jBCzA<)4`{9V`TliTvE6R}@IYGnE<6aX zQ2DsbgJ5x)2Uo+bx>@qJ))D}cBx&v>j^p+nDfzeNfp_3wFz9&jJQhV!<$mxIS`UZA zLCK&!olZrksyfj!hx*}xsw(H#w=}Gjy#u2tDtIuP&BFV`7*mY*|F|E-aZHKiCZKd} z^z{2dqxXXFAW4$z6Z*XVWlqYd%k%ttk)7`cz%L&j;JqNB-h~G@wKGt^AG`!O!SQ&! ai2rZc8DC!3*65S~0000P{(@P~opePCsLL^z=i4(nHq{rv- z;wg8w&5zgbupSuOxvDA_BjAe0b@^aSN6ZJJKG5-j#8DU@%qLOgKodIqIN&n}jFGU7 zKdz?_L>=g(4~#V!h5^CLMITsU?7GgmAGG=)gq5B3fhh$7fUox-r%OoN1FP|Y7zHBY z&$n(FzWXpSGns1RHO}>M1wIfB*7B|3Wjxmhw|_5$sP*voLXbuRfH;o1ZNOQU$%=S; zJ~*9D7x^HvU8;TG(_HSrWx90DbRH=3<^zrK`ugA(1j$ky!mGjH00000NkvXXu0mjf D@G;Vr literal 0 HcmV?d00001 diff --git a/mods/tnt/textures/tnt_gunpowder_burning_t_junction_animated.png b/mods/tnt/textures/tnt_gunpowder_burning_t_junction_animated.png new file mode 100644 index 0000000000000000000000000000000000000000..a556072c01baa3ad0c0dce4719974cbac8fc7063 GIT binary patch literal 672 zcmV;R0$=@!P)DbJt>;JPk}2=WZ%IF1@no`I4ip*(|r z6vEjw%@SZd9ybFMp>xg!k)+IlAn{lVwYMW2Ju2IikVHInjhl7r1=W9%Z?vqL>#HTjo~BYrQJOGBv+<_lid!?6R}GUwz)3qL;>h_BdQ zL~q`u0Dd5jW4RvOTo=`f+~Z@u;HZAr)&rx40urYlav-c-cLUE~yXg1($g^Lx10m_b zRXq^XNemgSat_1ryvYOrzVGXSG?|MGXIc|U(*tl_mnz-(czPhUPN#F3{XnLTCplp3 z!6)Nb#hwKC^8WXIv$XHq#j>n2nlw%6=DI)}$0SX`aU9As&}cNOD)V7#&GkT3rt*HE ze2psm0Xybg6ooNgaD4ytSJVS~y)eh>tK)bT%^-`Qouqhc5U0000eyp|f0$G^M#AJ-Xhs78PfcVE!N`?GdKstPm;I+{% z=6NOnarXzgU_Q;=d6|D$g9H5QqV^K61`{CwU$~g{;Ai7vbC5*0tErzOrEm00000NkvXXu0mjfvjA$o literal 0 HcmV?d00001 diff --git a/mods/tnt/textures/tnt_gunpowder_curved.png b/mods/tnt/textures/tnt_gunpowder_curved.png new file mode 100644 index 0000000000000000000000000000000000000000..cb8b4eacff8135621086125e0034f0f01de77f86 GIT binary patch literal 268 zcmV+n0rUQeP)cU|G%*jJ0%Df7Vnzdt##MgCUU01|$jA@!smL=#_t(20T za|pu_%d)_Gk2FmYMG>TwnCF>(yxkbXT5BH1k=wRq04R!r-+H`h8dgfN)|%_O=8sml z)-nN7~!b)01xe-HUk;uT=ucLYIzBuVfq01@FlPaMbbbnP!1b3Q(f Sv?!tg0000ZBLLe6pzW?KSQTTe%Qf!UJ4umWuVJDjnMCiIsfMR=GY_TlMJ=9@- zW0CW}GTSYKq9_EI_x^6OZ@l-4m|U}2e2!#P*R=pm)AY-v9WZ&ekM&kuA^2G&|a z2){?BMF7`DkaOnweBzwrd_GfEm3r^VIkQ@=*zI<#*K4(XHma&ZL`W&oGz~dtZnqnk z%Y~E@`~AK@hxvT2fG(FyO)05}=yto+qA0Z0R|~W&gWlmMpvU7ujFA{4MNx1(9?hH7 zbY4M3^m@G-fEXjzTD2xyp`<>ZrHoVR$C0#5Q ay^Ak!rCtr@ct0-y0000