mirror of
https://codeberg.org/tenplus1/mobs_monster.git
synced 2024-12-23 01:10:26 +01:00
use global particle effect function for sand/lava monster
This commit is contained in:
parent
4477466120
commit
475e0f5624
@ -62,21 +62,7 @@ mobs:register_mob("mobs_monster:lava_flan", {
|
|||||||
|
|
||||||
pos.y = pos.y + 1
|
pos.y = pos.y + 1
|
||||||
|
|
||||||
minetest.add_particlespawner({
|
mobs:effect(pos, 40, "tnt_smoke.png", 3, 5, 2, 0.5, nil, false)
|
||||||
amount = 40,
|
|
||||||
time = 0.25,
|
|
||||||
minpos = pos,
|
|
||||||
maxpos = pos,
|
|
||||||
minvel = {x = -2, y = 0, z = -2},
|
|
||||||
maxvel = {x = 2, y = 2, z = 2},
|
|
||||||
minacc = {x = 0, y = 0, z = 0},
|
|
||||||
maxacc = {x = 0, y = 10, z = 0},
|
|
||||||
minexptime = 0.1,
|
|
||||||
maxexptime = 1,
|
|
||||||
minsize = 3.0,
|
|
||||||
maxsize = 5.0,
|
|
||||||
texture = "tnt_smoke.png",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.sound_play("fire_extinguish_flame",
|
minetest.sound_play("fire_extinguish_flame",
|
||||||
{pos = pos, max_hear_distance = 12, gain = 1.5}, true)
|
{pos = pos, max_hear_distance = 12, gain = 1.5}, true)
|
||||||
@ -91,21 +77,7 @@ mobs:register_mob("mobs_monster:lava_flan", {
|
|||||||
minetest.set_node(pos, {name = "fire:basic_flame"})
|
minetest.set_node(pos, {name = "fire:basic_flame"})
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.add_particlespawner({
|
mobs:effect(pos, 40, "fire_basic_flame.png", 2, 3, 2, 5, 10, nil)
|
||||||
amount = 20,
|
|
||||||
time = 0.25,
|
|
||||||
minpos = pos,
|
|
||||||
maxpos = pos,
|
|
||||||
minvel = {x = -2, y = -2, z = -2},
|
|
||||||
maxvel = {x = 2, y = 2, z = 2},
|
|
||||||
minacc = {x = 0, y = -10, z = 0},
|
|
||||||
maxacc = {x = 0, y = -10, z = 0},
|
|
||||||
minexptime = 0.1,
|
|
||||||
maxexptime = 1,
|
|
||||||
minsize = 1.0,
|
|
||||||
maxsize = 2.0,
|
|
||||||
texture = "fire_basic_flame.png",
|
|
||||||
})
|
|
||||||
|
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
end
|
end
|
||||||
|
@ -95,9 +95,9 @@ mobs:register_mob("mobs_monster:sand_monster", {
|
|||||||
]]
|
]]
|
||||||
on_die = function(self, pos)
|
on_die = function(self, pos)
|
||||||
pos.y = pos.y + 0.5
|
pos.y = pos.y + 0.5
|
||||||
effect(pos, 30, "mobs_sand_particles.png", 0.1, 2, 3, 5)
|
mobs:effect(pos, 30, "mobs_sand_particles.png", .1, 2, 3, 5)
|
||||||
pos.y = pos.y + 0.25
|
pos.y = pos.y + 0.25
|
||||||
effect(pos, 30, "mobs_sand_particles.png", 0.1, 2, 3, 5)
|
mobs:effect(pos, 30, "mobs_sand_particles.png", .1, 2, 3, 5)
|
||||||
end,
|
end,
|
||||||
--[[
|
--[[
|
||||||
on_rightclick = function(self, clicker)
|
on_rightclick = function(self, clicker)
|
||||||
|
Loading…
Reference in New Issue
Block a user