diff --git a/mods/CORE/mcl_particles/textures/mcl_particles_crit.png b/mods/CORE/mcl_particles/textures/mcl_particles_crit.png index 5b7fd3f6e..25d5615b2 100644 Binary files a/mods/CORE/mcl_particles/textures/mcl_particles_crit.png and b/mods/CORE/mcl_particles/textures/mcl_particles_crit.png differ diff --git a/mods/CORE/mcl_particles/textures/mcl_particles_droplet_bottle.png b/mods/CORE/mcl_particles/textures/mcl_particles_droplet_bottle.png index 77eec0691..ba2c9b116 100644 Binary files a/mods/CORE/mcl_particles/textures/mcl_particles_droplet_bottle.png and b/mods/CORE/mcl_particles/textures/mcl_particles_droplet_bottle.png differ diff --git a/mods/CORE/mcl_particles/textures/mcl_particles_instant_effect.png b/mods/CORE/mcl_particles/textures/mcl_particles_instant_effect.png new file mode 100644 index 000000000..bae450282 Binary files /dev/null and b/mods/CORE/mcl_particles/textures/mcl_particles_instant_effect.png differ diff --git a/mods/ITEMS/mcl_potions/lingering.lua b/mods/ITEMS/mcl_potions/lingering.lua index cb327accc..bfeff88f6 100644 --- a/mods/ITEMS/mcl_potions/lingering.lua +++ b/mods/ITEMS/mcl_potions/lingering.lua @@ -10,7 +10,7 @@ end local lingering_effect_at = {} -local function add_lingering_effect(pos, color, def, is_water) +local function add_lingering_effect(pos, color, def, is_water, instant) lingering_effect_at[pos] = {color = color, timer = 30, def = def, is_water = is_water} @@ -30,6 +30,8 @@ minetest.register_globalstep(function(dtime) local texture if vals.is_water then texture = "mcl_particles_droplet_bottle.png" + elseif vals.def.instant then + texture = "mcl_particles_instant_effect.png" else texture = "mcl_particles_effect.png" end @@ -145,7 +147,11 @@ minetest.register_entity(id.."_flying",{ minacc = {x=-0.2, y=-0.05, z=-0.2} maxacc = {x=0.2, y=0.05, z=0.2} else - texture = "mcl_particles_effect.png" + if def.instant then + texture = "mcl_particles_instant_effect.png" + else + texture = "mcl_particles_effect.png" + end minacc = {x=-0.2, y=0, z=-0.2} maxacc = {x=0.2, y=.05, z=0.2} end diff --git a/mods/ITEMS/mcl_potions/potions.lua b/mods/ITEMS/mcl_potions/potions.lua index 8b7380302..9202196a8 100644 --- a/mods/ITEMS/mcl_potions/potions.lua +++ b/mods/ITEMS/mcl_potions/potions.lua @@ -177,6 +177,7 @@ local function register_potion(def) longdesc = def._longdesc, potion_fun = get_splash_fun(def.effect, splash_dur), no_effect = def.no_effect, + instant = def.instant, } local ling_def @@ -186,6 +187,7 @@ local function register_potion(def) longdesc = def._longdesc, potion_fun = get_lingering_fun(def.effect*mcl_potions.LINGERING_FACTOR, ling_dur), no_effect = def.no_effect, + instant = def.instant, } else ling_def = { @@ -193,6 +195,7 @@ local function register_potion(def) longdesc = def._longdesc, potion_fun = get_lingering_fun(def.effect, ling_dur), no_effect = def.no_effect, + instant = def.instant, } end @@ -201,6 +204,7 @@ local function register_potion(def) longdesc = def._longdesc, potion_fun = get_arrow_fun(def.effect, dur/8.), no_effect = def.no_effect, + instant = def.instant, } if def.color and not def.no_throwable then @@ -270,6 +274,7 @@ local function register_potion(def) longdesc = def._longdesc, potion_fun = get_splash_fun(7, splash_dur_2), no_effect = def.no_effect, + instant = def.instant, } else splash_def_2 = { @@ -277,6 +282,7 @@ local function register_potion(def) longdesc = def._longdesc, potion_fun = get_splash_fun(effect_II, splash_dur_2), no_effect = def.no_effect, + instant = def.instant, } end @@ -288,6 +294,7 @@ local function register_potion(def) longdesc = def._longdesc, potion_fun = get_lingering_fun(effect_II*mcl_potions.LINGERING_FACTOR, ling_dur_2), no_effect = def.no_effect, + instant = def.instant, } else ling_def_2 = { @@ -295,6 +302,7 @@ local function register_potion(def) longdesc = def._longdesc, potion_fun = get_lingering_fun(effect_II, ling_dur_2), no_effect = def.no_effect, + instant = def.instant, } end @@ -303,6 +311,7 @@ local function register_potion(def) longdesc = def._longdesc, potion_fun = get_arrow_fun(effect_II, dur_2/8.), no_effect = def.no_effect, + instant = def.instant, } if def.color and not def.no_throwable then @@ -346,18 +355,21 @@ local function register_potion(def) longdesc = def._longdesc, potion_fun = get_splash_fun(def.effect, splash_dur_pl), no_effect = def.no_effect, + instant = def.instant, } local ling_def_pl = { tt = get_tt(def._tt_plus, def.effect, ling_dur_pl), longdesc = def._longdesc, potion_fun = get_lingering_fun(def.effect, ling_dur_pl), no_effect = def.no_effect, + instant = def.instant, } local arrow_def_pl = { tt = get_tt(def._tt_pl, def.effect, dur_pl/8.), longdesc = def._longdesc, potion_fun = get_arrow_fun(def.effect, dur_pl/8.), no_effect = def.no_effect, + instant = def.instant, } if def.color and not def.no_throwable then mcl_potions.register_splash(def.name.."_plus", S("Splash @1 + Potion", def.description), def.color, splash_def_pl) @@ -449,6 +461,7 @@ local healing_def = { _longdesc = S("Instantly heals."), color = "#CC0000", effect = 4, + instant = true, on_use = mcl_potions.healing_func, is_II = true, } @@ -462,6 +475,7 @@ local harming_def = { _longdesc = S("Instantly deals damage."), color = "#660099", effect = -6, + instant = true, on_use = mcl_potions.healing_func, is_II = true, is_inv = true, diff --git a/mods/ITEMS/mcl_potions/splash.lua b/mods/ITEMS/mcl_potions/splash.lua index fb47ebd8a..14c7f455e 100644 --- a/mods/ITEMS/mcl_potions/splash.lua +++ b/mods/ITEMS/mcl_potions/splash.lua @@ -71,7 +71,11 @@ function mcl_potions.register_splash(name, descr, color, def) texture = "mcl_particles_droplet_bottle.png" acc = {x=0, y=-GRAVITY, z=0} else - texture = "mcl_particles_effect.png" + if def.instant then + texture = "mcl_particles_instant_effect.png" + else + texture = "mcl_particles_effect.png" + end acc = {x=0, y=0, z=0} end minetest.add_particlespawner({