Add more death messages
This commit is contained in:
parent
8970bd16ef
commit
95e8f80f2c
5 changed files with 9 additions and 23 deletions
|
@ -1,3 +1,4 @@
|
|||
mcl_sounds
|
||||
mcl_core
|
||||
mcl_hunger
|
||||
mcl_death_messages
|
||||
|
|
|
@ -35,10 +35,11 @@ local on_step_add = function(self, dtime)
|
|||
if hp < 0 then
|
||||
hp = 0
|
||||
end
|
||||
v:set_hp(hp)
|
||||
if v:is_player() then
|
||||
mcl_death_messages.player_damage(v, string.format("%s was smashed by a falling anvil.", v:get_player_name()))
|
||||
mcl_hunger.exhaust(v:get_player_name(), mcl_hunger.EXHAUST_DAMAGE)
|
||||
end
|
||||
v:set_hp(hp)
|
||||
if hp == 0 then
|
||||
kill = true
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue