- if defined_type == "rain" then
- add_ps({
- amount = 3,
- time = 0.5,
- minpos = new_vec(x-0.5,y,z-0.5),
- maxpos = new_vec(x+0.5,y+20,z+0.5),
- minvel = {x=0, y=-20, z=0},
- maxvel = {x=0, y=-20, z=0},
- minacc = {x=0, y=0, z=0},
- maxacc = {x=0, y=0, z=0},
- minexptime = 0.5,
- maxexptime = 0.5,
- minsize = 4,
- maxsize = 4,
- collisiondetection = true,
- collision_removal = true,
- object_collision = false,
- vertical = true,
- texture = "raindrop.png^[opacity:80",
- playername = l_name,
- })
- elseif defined_type == "snow" then
- add_ps({
- amount = 1,
- time = 0.5,
- minpos = vector.new(x-0.5,y,z-0.5),
- maxpos = vector.new(x+0.5,y+20,z+0.5),
- minvel = {x=-0.2, y=-0.2, z=-0.2},
- maxvel = {x=0.2, y=-0.5, z=0.2},
- minacc = {x=0, y=0, z=0},
- maxacc = {x=0, y=0, z=0},
- minexptime = 1,
- maxexptime = 1,
- minsize = 1,
- maxsize = 1,
- collisiondetection = true,
- collision_removal = true,
- object_collision = false,
- texture = "snowflake_"..math.random(1,2)..".png",
- playername = l_name,
- })
- elseif defined_type == "ichor" then
- add_ps({
- amount = 1,
- time = 0.5,
- minpos = vector.new(x-0.5,y,z-0.5),
- maxpos = vector.new(x+0.5,y+20,z+0.5),
- minvel = {x=-0.2, y=0.2, z=-0.2},
- maxvel = {x=0.2, y=0.5, z=0.2},
- minacc = {x=0, y=0, z=0},
- maxacc = {x=0, y=0, z=0},
- minexptime = 1,
- maxexptime = 1,
- minsize = 1,
- maxsize = 1,
- collisiondetection = true,
- collision_removal = true,
- object_collision = false,
- texture = "ichor_"..math.random(1,2)..".png",
- playername = player:get_name(),
- })
- end