1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-06-28 06:11:47 +02:00

Merged missing parts of mobs' api, updated news

- Updated news.txt
 - Merged missing pieces of api.lua
 - Added a random message
This commit is contained in:
LeMagnesium
2015-04-21 12:32:35 +02:00
parent 5d5bf2dbd7
commit 94c1d3cefa
3 changed files with 15 additions and 6 deletions

View File

@ -80,7 +80,6 @@ lifetimer = def.lifetimer or 600,
if self.state ~= "attack" then
if math.random(0,100) < 90 and self.sounds.war_cry then
minetest.sound_play(self.sounds.war_cry,{object = self.object})
print ("attack sound")
end
self.state = "attack"
self.attack.player = player
@ -633,7 +632,7 @@ lifetimer = def.lifetimer or 600,
self.timer = self.timer + dtime
self.blinktimer = (self.blinktimer or 0) + dtime
if self.blinktimer > 0.2 then
self.blinktimer = self.blinktimer - 0.2
self.blinktimer = 0 -- self.blinktimer - 0.2
if self.blinkstatus then
self.object:settexturemod("")
else
@ -977,7 +976,7 @@ end
-- compatibility with older mob registration
function mobs:register_spawn(name, nodes, max_light, min_light, chance, active_object_count, max_height)
mobs:spawn_specific(name, nodes, {"air"}, min_light, max_light, 30, chance, active_object_count, -32000, max_height)
mobs:spawn_specific(name, nodes, {"air"}, min_light, max_light, 30, chance, active_object_count, -31000, max_height)
end
-- particle effects