From 2a29ec78274906860c7db99eb2aa2e67a1393d10 Mon Sep 17 00:00:00 2001 From: Brandon Date: Sat, 27 Jun 2020 11:27:57 -0400 Subject: [PATCH] Add sprite effects during brew. --- mods/ITEMS/mcl_brewing/init.lua | 19 ++++++++++++++++++ .../textures/mcl_brewing_bubble_sprite.png | Bin 0 -> 240 bytes 2 files changed, 19 insertions(+) create mode 100644 mods/ITEMS/mcl_brewing/textures/mcl_brewing_bubble_sprite.png diff --git a/mods/ITEMS/mcl_brewing/init.lua b/mods/ITEMS/mcl_brewing/init.lua index f8d001a21a..6234e5badb 100755 --- a/mods/ITEMS/mcl_brewing/init.lua +++ b/mods/ITEMS/mcl_brewing/init.lua @@ -146,6 +146,25 @@ local function brewing_stand_timer(pos, elapsed) fuel_timer = 0 end + local d = 0.5 + minetest.add_particlespawner({ + amount = 4, + time = 1, + minpos = {x=pos.x-d, y=pos.y+0.5, z=pos.z-d}, + maxpos = {x=pos.x+d, y=pos.y+2, z=pos.z+d}, + minvel = {x=-0.1, y=0, z=-0.1}, + maxvel = {x=0.1, y=0.5, z=0.1}, + minacc = {x=-0.05, y=0, z=-0.05}, + maxacc = {x=0.05, y=.1, z=0.05}, + minexptime = 1, + maxexptime = 2, + minsize = 0.5, + maxsize = 2, + collisiondetection = true, + vertical = false, + texture = "mcl_brewing_bubble_sprite.png", + }) + -- Replace the stand item with the brew result if stand_timer >= BREW_TIME then diff --git a/mods/ITEMS/mcl_brewing/textures/mcl_brewing_bubble_sprite.png b/mods/ITEMS/mcl_brewing/textures/mcl_brewing_bubble_sprite.png new file mode 100644 index 0000000000000000000000000000000000000000..119b7b857cda509fca2b2c01c0a302a77990f90f GIT binary patch literal 240 zcmeAS@N?(olHy`uVBq!ia0vp^%plCc1|-8Yw(bW~jKx9jP7LeL$-D$|a#ABa(|mmy zw18|51{Ovs23C*~Ahu(ahO^xmHNfUDGB7bPv}ZD~K-KsGX%I*NVvrsP&9s0Cu7Y_1 zGlC6N!LVBR4ah~D1s;*b3=DinK$vl=HlH+5P}bAMF@!@lIf0?6Q&{~U`$ZiEx41aD f4qmZ_(+mvf&U2-(*i7#ODrE3<^>bP0l+XkKNVOz< literal 0 HcmV?d00001