mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 04:21:07 +01:00
improve crying obsidian visuals
This commit is contained in:
parent
29a97efc3f
commit
da4aa9bc35
1 changed files with 18 additions and 49 deletions
|
@ -1702,41 +1702,14 @@ end
|
||||||
|
|
||||||
-- Obsidian crying
|
-- Obsidian crying
|
||||||
|
|
||||||
local crobby_psdef = {
|
local crobby_particle = {
|
||||||
amount = 1,
|
velocity = vector.new(0,0,0),
|
||||||
time = 0.9, --everything longer than 1 is a coord exploit
|
size = math.random(1.3,2.5),
|
||||||
minvel = vector.new(0,-2,0),
|
|
||||||
maxvel = vector.new(0,-0.5,0),
|
|
||||||
minacc = vector.new(0,-10,0),
|
|
||||||
maxacc = vector.new(0,-8,0),
|
|
||||||
minexptime = 1,
|
|
||||||
maxexptime = 6,
|
|
||||||
minsize = 1.5,
|
|
||||||
maxsize = 2,
|
|
||||||
collisiondetection = true,
|
|
||||||
collision_removal = true,
|
|
||||||
object_collision = true,
|
|
||||||
vertical = true,
|
|
||||||
texture = "mcl_core_crying_obsidian_tear.png",
|
|
||||||
}
|
|
||||||
local crobby_psdef2 = {
|
|
||||||
amount = 1,
|
|
||||||
time = 0.9, --everything longer than 1 is a coord exploit
|
|
||||||
minvel = vector.new(0,-0.01,0),
|
|
||||||
maxvel = vector.new(0,-0.005,0),
|
|
||||||
minacc = vector.new(0,-0.1,0),
|
|
||||||
maxacc = vector.new(0,-0.01,0),
|
|
||||||
minexptime = 2,
|
|
||||||
maxexptime = 3,
|
|
||||||
minsize = 0.3,
|
|
||||||
maxsize = 0.6,
|
|
||||||
collisiondetection = true,
|
|
||||||
collision_removal = true,
|
|
||||||
object_collision = true,
|
|
||||||
vertical = true,
|
|
||||||
texture = "mcl_core_crying_obsidian_tear.png",
|
texture = "mcl_core_crying_obsidian_tear.png",
|
||||||
|
collision_removal = false,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
label = "Obsidian cries",
|
label = "Obsidian cries",
|
||||||
nodenames = {"mcl_core:crying_obsidian"},
|
nodenames = {"mcl_core:crying_obsidian"},
|
||||||
|
@ -1744,22 +1717,18 @@ minetest.register_abm({
|
||||||
chance = 10,
|
chance = 10,
|
||||||
action = function(pos, node)
|
action = function(pos, node)
|
||||||
minetest.after(math.random(0.1,1.5),function()
|
minetest.after(math.random(0.1,1.5),function()
|
||||||
crobby_psdef.minpos = vector.offset(pos,-0.6,-0.51,-0.6)
|
local pt = table.copy(crobby_particle)
|
||||||
crobby_psdef.maxpos = vector.offset(pos,0.6,0.51,0.6)
|
pt.acceleration = vector.new(0,0,0)
|
||||||
minetest.add_particlespawner(crobby_psdef)
|
pt.collisiondetection = false
|
||||||
crobby_psdef2.minpos = vector.offset(pos,-0.51,-0.51,-0.51)
|
pt.expirationtime = math.random(0.5,1.5)
|
||||||
crobby_psdef2.maxpos = vector.offset(pos,-0.5,0.51,-0.5)
|
pt.pos = vector.offset(pos,math.random(-0.5,0.5),-0.51,math.random(-0.5,0.5))
|
||||||
minetest.add_particlespawner(crobby_psdef2)
|
minetest.add_particle(pt)
|
||||||
crobby_psdef2.minpos = vector.offset(pos,0.51,-0.51,-0.51)
|
minetest.after(pt.expirationtime,function()
|
||||||
crobby_psdef2.maxpos = vector.offset(pos,0.5,0.51,-0.5)
|
pt.acceleration = vector.new(0,-9,0)
|
||||||
minetest.add_particlespawner(crobby_psdef2)
|
pt.collisiondetection = true
|
||||||
crobby_psdef2.minpos = vector.offset(pos,0.51,-0.51,0.51)
|
pt.expirationtime = math.random(1.2,4.5)
|
||||||
crobby_psdef2.maxpos = vector.offset(pos,0.5,0.51,0.5)
|
minetest.add_particle(pt)
|
||||||
minetest.add_particlespawner(crobby_psdef2)
|
end)
|
||||||
crobby_psdef2.minpos = vector.offset(pos,-0.51,-0.51,0.51)
|
|
||||||
crobby_psdef2.maxpos = vector.offset(pos,-0.5,0.51,0.5)
|
|
||||||
minetest.add_particlespawner(crobby_psdef2)
|
|
||||||
|
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue