Add mob eating sound and effect
This commit is contained in:
parent
8c484c1f8c
commit
437dd38e3d
@ -1744,6 +1744,25 @@ function mobs:feed_tame(self, clicker, feed_count, breed)
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
end
|
||||
mob_sound(self, self.sounds.eat, true)
|
||||
|
||||
local mobpos = self.object:get_pos()
|
||||
minetest.add_particlespawner(
|
||||
{
|
||||
amount = 10,
|
||||
time = 0.1,
|
||||
minpos = {x = mobpos.x - 0.1, y = mobpos.y - 0.1, z = mobpos.z - 0.1},
|
||||
maxpos = {x = mobpos.x + 0.1, y = mobpos.y + 0.1, z = mobpos.z + 0.1},
|
||||
minvel = {x = -1, y = -1, z = -1},
|
||||
maxvel = {x = 1, y = 0, z = 1},
|
||||
minacc = {x = 0, y = 6, z = 0},
|
||||
maxacc = {x = 0, y = 1, z = 0},
|
||||
minexptime = 0.5,
|
||||
maxexptime = 1,
|
||||
minsize = 0.5,
|
||||
maxsize = 2,
|
||||
texture = "magicpuff.png"
|
||||
})
|
||||
|
||||
self:check_fed(name, feed_count, breed)
|
||||
|
||||
|
@ -27,6 +27,7 @@ mobs:register_mob(
|
||||
damage = "mobs_boar",
|
||||
attack = "mobs_boar_angry",
|
||||
death = "mobs_boar_angry",
|
||||
eat = "mobs_eat",
|
||||
distance = 16,
|
||||
},
|
||||
walk_velocity = 2,
|
||||
|
@ -26,6 +26,7 @@ mobs:register_mob(
|
||||
random = "mobs_sheep",
|
||||
death = "mobs_sheep",
|
||||
damage = "mobs_sheep",
|
||||
eat = "mobs_eat",
|
||||
distance = 16,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
|
@ -24,6 +24,7 @@ mobs:register_mob(
|
||||
attack = "mobs_skunk_hiss",
|
||||
damage = "mobs_skunk_hiss",
|
||||
death = "mobs_skunk_hiss",
|
||||
eat = "mobs_eat",
|
||||
distance = 16,
|
||||
},
|
||||
walk_velocity = 1.5,
|
||||
|
BIN
mods/mobs/sounds/mobs_eat.ogg
Normal file
BIN
mods/mobs/sounds/mobs_eat.ogg
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user