From cd5fbdf240fac13a5c2abb3c6bec045dd54c8900 Mon Sep 17 00:00:00 2001 From: BuckarooBanzay Date: Thu, 6 Feb 2020 14:41:41 +0100 Subject: [PATCH] add blue particle effects --- technic/effects.lua | 25 +++++++++++++++++++++++++ technic/init.lua | 3 +++ technic/textures/blueparticle.png | Bin 0 -> 225 bytes 3 files changed, 28 insertions(+) create mode 100644 technic/effects.lua create mode 100644 technic/textures/blueparticle.png diff --git a/technic/effects.lua b/technic/effects.lua new file mode 100644 index 0000000..d49398a --- /dev/null +++ b/technic/effects.lua @@ -0,0 +1,25 @@ + + +minetest.register_abm({ + nodenames = {"technic:hv_nuclear_reactor_core_active"}, + interval = 10, + chance = 1, + action = function(pos, node) + minetest.add_particlespawner({ + amount = 50, + time = 10, + minpos = {x=pos.x-0.5, y=pos.y-0.5, z=pos.z-0.5}, + maxpos = {x=pos.x+0.5, y=pos.y+0.5, z=pos.z+0.5}, + minvel = {x=-0.8, y=-0.8, z=-0.8}, + maxvel = {x=0.8, y=0.8, z=0.8}, + minacc = {x=0,y=0,z=0}, + maxacc = {x=0,y=0,z=0}, + minexptime = 0.5, + maxexptime = 2, + minsize = 1, + maxsize = 2, + texture = "blueparticle.png", + glow = 5 + }) + end +}) diff --git a/technic/init.lua b/technic/init.lua index 2a38800..e8dc101 100644 --- a/technic/init.lua +++ b/technic/init.lua @@ -47,6 +47,9 @@ dofile(modpath.."/tools/init.lua") -- Aliases for legacy node/item names dofile(modpath.."/legacy.lua") +-- visual effects +dofile(modpath.."/effects.lua") + if minetest.settings:get_bool("log_mods") then print(S("[Technic] Loaded in %f seconds"):format(os.clock() - load_start)) end diff --git a/technic/textures/blueparticle.png b/technic/textures/blueparticle.png new file mode 100644 index 0000000000000000000000000000000000000000..8fb679bc81b96d031f26f0d6b44d28b9389dd151 GIT binary patch literal 225 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqjKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85p>QK$!8;-MT+OLG}_)Usv|KEWCWeM#n6kg#d*(N?apKobz*Y zQ}ap~zMYx2A1EdP5(~~xD=AMbN@XZW%*-p%%S$a$Fwry6GfizZN(HLX_H=O!(Fjgn zp!DPaen!@0h6xXj_p=|6h;(FjW>%ij=*=k8z%tQrDg!e!Lm;zekzOeu$Y=&nS3j3^ HP6