From 1cca6ee664b09ad603679d5edeabff8e26c7a2ed Mon Sep 17 00:00:00 2001 From: D00Med Date: Fri, 28 Apr 2017 07:30:48 +1000 Subject: [PATCH] fancier crystals --- mods/mapgen/nodes.lua | 60 ++++++++++++++++--- mods/mapgen/textures/mapgen_crystal_anim.png | Bin 0 -> 1976 bytes mods/mapgen/textures/mapgen_crystal_glow.png | Bin 0 -> 8550 bytes 3 files changed, 52 insertions(+), 8 deletions(-) create mode 100644 mods/mapgen/textures/mapgen_crystal_anim.png create mode 100644 mods/mapgen/textures/mapgen_crystal_glow.png diff --git a/mods/mapgen/nodes.lua b/mods/mapgen/nodes.lua index f8c762e..d74428d 100644 --- a/mods/mapgen/nodes.lua +++ b/mods/mapgen/nodes.lua @@ -1768,14 +1768,15 @@ minetest.register_node("mapgen:stalagmite2", { minetest.register_node("mapgen:crystal_small", { description = "Small Crystal", - tiles = { - "mapgen_crystal.png", - }, + tiles = {{ + name = "mapgen_crystal_anim.png", + animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 1.00}, + }}, use_texture_alpha = true, drawtype = "nodebox", paramtype = "light", paramtype2 = "facedir", - light_source = 5, + light_source = 7, node_box = { type = "fixed", fixed = { @@ -1797,14 +1798,15 @@ minetest.register_node("mapgen:crystal_small", { minetest.register_node("mapgen:crystal", { description = "Crystal", - tiles = { - "mapgen_crystal.png", - }, + tiles = {{ + name = "mapgen_crystal_anim.png", + animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 1.00}, + }}, use_texture_alpha = true, drawtype = "nodebox", paramtype = "light", paramtype2 = "facedir", - light_source = 5, + light_source = 7, node_box = { type = "fixed", fixed = { @@ -1822,6 +1824,48 @@ minetest.register_node("mapgen:crystal", { sounds = default.node_sound_glass_defaults() }) +minetest.register_abm({ + nodenames = {"mapgen:crystal_small"}, + interval = 5, + chance = 1, + action = function(pos, node) + minetest.add_particle({ + pos = {x=pos.x, y=pos.y+0.1, z=pos.z}, + velocity = {x=0, y=0, z=0}, + acceleration = {x=0, y=0, z=0}, + expirationtime = 5, + size = 15, + collisiondetection = false, + collisionremoval = false, + vertical = true, + texture = "mapgen_crystal_glow.png", + animation = {type = "vertical_frames", aspect_w = 32, aspect_h = 32, length = 1.00}, + glow = 9 + }) + end +}) + +minetest.register_abm({ + nodenames = {"mapgen:crystal"}, + interval = 5, + chance = 1, + action = function(pos, node) + minetest.add_particle({ + pos = {x=pos.x, y=pos.y+0.5, z=pos.z}, + velocity = {x=0, y=0, z=0}, + acceleration = {x=0, y=0, z=0}, + expirationtime = 5, + size = 25, + collisiondetection = false, + collisionremoval = false, + vertical = true, + texture = "mapgen_crystal_glow.png", + animation = {type = "vertical_frames", aspect_w = 32, aspect_h = 32, length = 1.00}, + glow = 9 + }) + end +}) + minetest.register_craftitem("mapgen:crystal_item", { description = "Crystal Shard", inventory_image = "mapgen_crystal_item.png" diff --git a/mods/mapgen/textures/mapgen_crystal_anim.png b/mods/mapgen/textures/mapgen_crystal_anim.png new file mode 100644 index 0000000000000000000000000000000000000000..4cec6eeb45769105a2e2baecb7aebf584d17f200 GIT binary patch literal 1976 zcmV;p2S@mcP)3|SJF`18{Zd_Za?uO+XNcUFB^{}&>#1Kq@|VAzo>e{aeHruD z*K1DNk&|{Ls1UQ!6beA&l$ecO%pcav6{=Z{UCJzHo?Xlzh5?#Fd2uq(IAz@@Zq5QR z8#iYGIWy_|j5mR*P~=s1yIVO06`G(d3df>!EKARB%sjf$aMF(a`R0rtp6+B3R8&Eo z6Py!n%>w|z3(MMbyp6& z(Rk(2vf=1r;NC&W@n(>d?Z~=MqVvj82H|Zt0K@ZCuZz|nSK-6wv0 z+-hOMzE^TI{LyZpib86$eKC5sx+UrHdCwv^nxH(o-mo4L>ppQSc^Nd55>$xvDWkPh zvOrT$TL?~wqp_?#5BE!sxADWtY=$IakfKRIFu=dUnTb@?_gvS*WdZW|K00Jtl%c z85Ca&F$v2(55Vh9Asf5#(u1J*GgCE%Hf65WQ()c?!!-Q-EHZP-YDnCyJuw>}*B(2|(hW9wPzHsc zvTJY4`2Kl% z5m^M~=|$wzCNM*otDs&nQ>^mBYM4A|$4qd-(Jrzm9JLd^J*arG8~JP=INpx(wjEjb zS#+;-lwLTw#AMZFu2!BqP2gtb`R=R(;AI)P2eW$GLQo+l<7(x3uvhT99XaU} zUWJPxi)2WnNiZbT@Ki=Fz%P zyb8;?V>xqt@D{G-_#C+`pZ-PfSC>^Kg z(SG-n^IKASwTUbXZ(iUuB{rQAf^dD`+dE4P7<$}}>{8}--e=ealn>@g9?>(?YQwZxJvFbAZD=8#w zkth2(-@g&;-H^wVehSo>q4vTx{09%(l!=$?`rd=iGS^C_9gS&tx`DM9o}Z7*oU)FI zk19vZaI48`5Wp?cyNkO4@%EBxAL0JYzn~iT4CGUpBAFq^r|FW04iirP} z2cOi_*?SeP7Ru{>B-$??Jl~D%d*%6V`$4Hy`2D=# zr!Mhn<2l}qa?&N%LlWI9mC^~Pm&2>UI4m5uYtKie<3H!qPxiPUS;xc=N4*9U_EgEE z;a_$mKEW`U-F>63yQAsJE^^?N$_d{t3eLyOMaO^N-WAj)RU zNQP(q$c@_JYcIG_ST+uyjq*7@KCtm^pP9Kt<%DQPI5S=Ki7%T{UUVZxFuTYZT?8d! zwyfObff@fg8+bVPRBlS+;zIPi2c_7G#4Nyh%&Z2( zyR`|u$$y)azd0=JyXIH@V4QjY4rT(w_**~ttsnf>5B`t)!T$hl5V^TH8MvhY0000< KMNUMnLSTZ+tHoFV literal 0 HcmV?d00001 diff --git a/mods/mapgen/textures/mapgen_crystal_glow.png b/mods/mapgen/textures/mapgen_crystal_glow.png new file mode 100644 index 0000000000000000000000000000000000000000..c3279282d93470f781c655c3c9af310957d81f97 GIT binary patch literal 8550 zcmZ`EYp}4oWOIsX@7AR1xT)zAJ z-XBTMNhVK{nKP3o5(Cjt!oj4(1ONa>87!~;QqsSqK6KQV+*Z=k=cT}K0~>h)02a}I z2?5B>C;v}KSzbohckMLLD9vWn`-c(#l}pPX@%cB|g*5c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