Add crying obsidian particle effect
This commit is contained in:
parent
9d8ff427f3
commit
78e187537f
|
@ -1698,3 +1698,44 @@ function mcl_core.after_snow_destruct(pos)
|
|||
local node = minetest.get_node(npos)
|
||||
mcl_core.clear_snow_dirt(npos, node)
|
||||
end
|
||||
|
||||
|
||||
-- Obsidian crying
|
||||
|
||||
local crying_obsidian_tears = {
|
||||
"mcl_core_crying_obsidian_tear.png",
|
||||
"mcl_core_crying_obsidian_tear2.png",
|
||||
"mcl_core_crying_obsidian_tear3.png"
|
||||
}
|
||||
|
||||
local psdef = {
|
||||
amount = 10,
|
||||
time = 0.9, --everything longer than 1 is a coord exploit
|
||||
minvel = vector.new(0,-0.15,0),
|
||||
maxvel = vector.new(0,-0.001,0),
|
||||
minacc = vector.new(0,-0.1,0),
|
||||
maxacc = vector.new(0,-0.001,0),
|
||||
minexptime = 1,
|
||||
maxexptime = 6,
|
||||
minsize = 0.1,
|
||||
maxsize = 0.25,
|
||||
collisiondetection = true,
|
||||
collision_removal = true,
|
||||
object_collision = true,
|
||||
vertical = true,
|
||||
}
|
||||
|
||||
minetest.register_abm({
|
||||
label = "Obsidian cries",
|
||||
nodenames = {"mcl_core:crying_obsidian"},
|
||||
interval = 60,
|
||||
chance = 10,
|
||||
action = function(pos, node)
|
||||
psdef.minpos = vector.offset(pos,-0.6,-0.51,-0.6)
|
||||
psdef.maxpos = vector.offset(pos,0.6,-0.51,0.6)
|
||||
for _,t in pairs(crying_obsidian_tears) do
|
||||
psdef.texture = t
|
||||
minetest.add_particlespawner(psdef)
|
||||
end
|
||||
end
|
||||
})
|
||||
|
|
BIN
mods/ITEMS/mcl_core/textures/mcl_core_crying_obsidian_tear.png
Normal file
BIN
mods/ITEMS/mcl_core/textures/mcl_core_crying_obsidian_tear.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 91 B |
BIN
mods/ITEMS/mcl_core/textures/mcl_core_crying_obsidian_tear2.png
Normal file
BIN
mods/ITEMS/mcl_core/textures/mcl_core_crying_obsidian_tear2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 86 B |
BIN
mods/ITEMS/mcl_core/textures/mcl_core_crying_obsidian_tear3.png
Normal file
BIN
mods/ITEMS/mcl_core/textures/mcl_core_crying_obsidian_tear3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 83 B |
Loading…
Reference in New Issue
Block a user