1
0
Fork 0

Tweak splash potion particles

objects
Wuzzy 2020-08-05 19:06:32 +02:00
parent 1f8488aba5
commit 20455a259f
1 changed files with 17 additions and 17 deletions

View File

@ -59,23 +59,23 @@ function mcl_potions.register_splash(name, descr, color, def)
local pos = self.object:get_pos() local pos = self.object:get_pos()
local node = minetest.get_node(pos) local node = minetest.get_node(pos)
local n = node.name local n = node.name
local d = 2 local d = 0.1
local redux_map = {7/8,0.5,0.25} local redux_map = {7/8,0.5,0.25}
if n ~= "air" and n ~= "mcl_portals:portal" and n ~= "mcl_portals:portal_end" or mcl_potions.is_obj_hit(self, pos) then if n ~= "air" and n ~= "mcl_portals:portal" and n ~= "mcl_portals:portal_end" or mcl_potions.is_obj_hit(self, pos) then
minetest.sound_play("mcl_potions_breaking_glass", {pos = pos, max_hear_distance = 16, gain = 1}) minetest.sound_play("mcl_potions_breaking_glass", {pos = pos, max_hear_distance = 16, gain = 1})
minetest.add_particlespawner({ minetest.add_particlespawner({
amount = 50, amount = 50,
time = 2, time = 0.1,
minpos = {x=pos.x-d, y=pos.y+0.5, z=pos.z-d}, minpos = {x=pos.x-d, y=pos.y+0.5, z=pos.z-d},
maxpos = {x=pos.x+d, y=pos.y+d, z=pos.z+d}, maxpos = {x=pos.x+d, y=pos.y+0.5+d, z=pos.z+d},
minvel = {x=-1, y=0, z=-1}, minvel = {x=-2, y=0, z=-2},
maxvel = {x=1, y=0.5, z=1}, maxvel = {x=2, y=2, z=2},
minacc = {x=-0.5, y=0, z=-0.5}, minacc = {x=0, y=0, z=0},
maxacc = {x=0.5, y=.2, z=0.5}, maxacc = {x=0, y=0, z=0},
minexptime = 1, minexptime = 0.5,
maxexptime = 3, maxexptime = 1.25,
minsize = 2, minsize = 1,
maxsize = 4, maxsize = 2,
collisiondetection = true, collisiondetection = true,
vertical = false, vertical = false,
texture = "mcl_potions_sprite.png^[colorize:"..color..":127", texture = "mcl_potions_sprite.png^[colorize:"..color..":127",