From 24939c299b07507c148ddead09a52ae122120c25 Mon Sep 17 00:00:00 2001 From: PilzAdam Date: Sun, 25 Nov 2012 14:18:06 +0100 Subject: [PATCH 1/4] Add animation for fire --- mods/fire/README.txt | 2 ++ mods/fire/init.lua | 8 ++++++-- mods/fire/textures/fire_basic_flame_animated.png | Bin 0 -> 2250 bytes 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 mods/fire/textures/fire_basic_flame_animated.png diff --git a/mods/fire/README.txt b/mods/fire/README.txt index 564d4a2a..fdbce15f 100644 --- a/mods/fire/README.txt +++ b/mods/fire/README.txt @@ -28,3 +28,5 @@ fire_small.ogg sampled from: fire_large.ogg sampled from: http://www.freesound.org/people/Dynamicell/sounds/17548/ +fire_basic_flame_animated.png: + Muadtralk diff --git a/mods/fire/init.lua b/mods/fire/init.lua index 846a2d34..3480fcb3 100644 --- a/mods/fire/init.lua +++ b/mods/fire/init.lua @@ -2,8 +2,12 @@ minetest.register_node("fire:basic_flame", { description = "Fire", - drawtype = "glasslike", - tiles = {"fire_basic_flame.png"}, + drawtype = "plantlike", + tiles = {{ + name="fire_basic_flame_animated.png", + animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=1}, + }}, + inventory_image = "fire_basic_flame.png", light_source = 14, groups = {igniter=2,dig_immediate=3}, drop = '', diff --git a/mods/fire/textures/fire_basic_flame_animated.png b/mods/fire/textures/fire_basic_flame_animated.png new file mode 100644 index 0000000000000000000000000000000000000000..f04447074de71688524bc72ed8a63b2996fe5b11 GIT binary patch literal 2250 zcmV;*2sQVKP)uX|20#*OnA3oCcz5bnZe&=!T?{mKA0G}gmEHU%js;|=HcH^W{d#ZF< z`Klk-O<9JuWx$a|rCGKwS#^AcRWEF(qjJ^@Zlie6RH#R@deJ?ohNo16=RF4Q4{7n% zaF87xjx(ju=7EHGo~u{Mrelp3{yn?wZJooych9wP{_|>ns-9(f(Nb&X=e}Ao<A+NEhNd-$WK{~6+AqMld=A*7Eewk|CKeQ7 zux0}AsSrygvE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zsX^j_qz{M(8=WS;H#r3l$ce%Na>hO@4`yNlIaI>=j!QfhzN@70VDb{*Tr=~gV{%Va zI|n0T;$D@=OHzNTR*6J(P1Xlz;*zSBl4gs8@y?_HyQHOkxm9+sdQ~-=uEjVl@1@06 z=(u_bRc@0|>PiC{pwRM8M%rx9oq9nap-l&|fG(2zlt(YTrjL*vlIT2kVZ6HcXDW&C@{cf0%M*pc zJxC4?!~ATGxH6MMtxtTggm>>aEqZd#a|^+u`9dEU{L*el7sbUBXW{sv7bRwo&)<8C-O`?^(u|G+r(_4j0>#O=J5Lx*6@>_29uOf- z|0i@Ks7p0s@Orn%M_-T72m5|@3hbjlmh<|dVqs^SPBZ@BWdbe~(%SS6n3ni|ANUZD zNW3_C{D>%9KKd0LK70V0`X;GQ!_sG&=K@!cWh(1BqJT^<5z_o`OE~F+g*)Vl-{?HX zw+u+nV!t3M6xuToRQMLT+X@rtP8Vqey5c(|HIq)ymE6?RitRJqbLR*0bmh(ua_0xR z^MfhSaVK$+J3q*sALPyta_0vMI&$X+x$^^U?)+fN^TgcwL7Eb|^Ml;^LGJwE|K$AO Yf4AIL0k9$f0000007*qoM6N<$f@C60#Q*>R literal 0 HcmV?d00001 From bed848f68a8940276cf48e9a0adfff21897ba3fd Mon Sep 17 00:00:00 2001 From: PilzAdam Date: Sun, 25 Nov 2012 14:20:09 +0100 Subject: [PATCH 2/4] Make fire hurt the player --- mods/fire/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/mods/fire/init.lua b/mods/fire/init.lua index 3480fcb3..c0d95a43 100644 --- a/mods/fire/init.lua +++ b/mods/fire/init.lua @@ -12,6 +12,7 @@ minetest.register_node("fire:basic_flame", { groups = {igniter=2,dig_immediate=3}, drop = '', walkable = false, + damage_per_second = 4, }) local fire = {} From 8a6b2df6b1ffb7905eb3414aa77fa973433f548d Mon Sep 17 00:00:00 2001 From: PilzAdam Date: Sun, 25 Nov 2012 14:24:44 +0100 Subject: [PATCH 3/4] Make functions of fire mod global and move register_on_* functions to node definition --- mods/fire/init.lua | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/mods/fire/init.lua b/mods/fire/init.lua index c0d95a43..b1c21e45 100644 --- a/mods/fire/init.lua +++ b/mods/fire/init.lua @@ -13,9 +13,17 @@ minetest.register_node("fire:basic_flame", { drop = '', walkable = false, damage_per_second = 4, + + after_place_node = function(pos, placer) + fire.on_flame_add_at(pos) + end, + + after_dig_node = function(pos, oldnode, oldmetadata, digger) + fire.on_flame_remove_at(pos) + end, }) -local fire = {} +fire = {} fire.D = 6 -- key: position hash of low corner of area -- value: {handle=sound handle, name=sound name} @@ -93,18 +101,6 @@ function fire.flame_should_extinguish(pos) return (#ps ~= 0) end -minetest.register_on_placenode(function(pos, newnode, placer) - if newnode.name == "fire:basic_flame" then - fire.on_flame_add_at(pos) - end -end) - -minetest.register_on_dignode(function(pos, oldnode, digger) - if oldnode.name == "fire:basic_flame" then - fire.on_flame_remove_at(pos) - end -end) - -- Ignite neighboring nodes minetest.register_abm({ nodenames = {"group:flammable"}, From d39044a2a7e52b14cbe3c8c24a1314e72b80a637 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Sun, 25 Nov 2012 14:05:30 -0500 Subject: [PATCH 4/4] new apple image. --- mods/default/textures/default_apple.png | Bin 203 -> 283 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/mods/default/textures/default_apple.png b/mods/default/textures/default_apple.png index 9593f28f6068b7d932036f42b9eede227e1c1616..ad03a1812bfdd97e3c795532444c3a87be310b53 100644 GIT binary patch delta 237 zcmV?1)~+^k&Y#7AOaq3yX>fxEz1XX}-#xehcGtc>-#V;-CZHV%lN2E;&1 zLC3S}B?B{^y{+ebyTd&S#8LvV6R70`cAx~{BCt(OT55;{P7XjOgGgZdfI$`Z=Izb( n2j4gZxh8?$k{w{3Q~#BoYri~D=r~1L00000NkvXXu0mjfv)X7y delta 154 zcmbQubeeI3iWFmUkh>GZx^prw85kH?(j9#r85lP9bN@+Xov0{LDp}$hQ4*Y=R#Ki= zl*$m0n3-3i=jR%tP-d)Ws%K$t-4F}ZW$o$W7-Hd{oFKt^*plVSE6IP#iEf+za2Yk| z^al7UoINo^W%B{4|DPQUCONuDGhOdVJK