Add more death messages

This commit is contained in:
Wuzzy 2017-07-24 19:36:04 +02:00
parent 8970bd16ef
commit 95e8f80f2c
5 changed files with 9 additions and 23 deletions

View file

@ -12,9 +12,6 @@ local msgs = {
"%s died in the flames.",
"%s died in a fire.",
},
["explosion"] = {
"%s was caught in an explosion.",
},
["lava"] = {
"%s melted in lava.",
"%s took a bath in a hot lava tub.",
@ -26,12 +23,6 @@ local msgs = {
"%s drowned.",
"%s ran out of oxygen.",
},
["void"] = {
"%s fell into the endless void.",
},
["suffocation"] = {
"%s suffocated to death.",
},
["starve"] = {
"%s starved.",
},
@ -49,13 +40,6 @@ local msgs = {
"A ghast scared %s to death.",
"%s has been fireballed by a ghast.",
},
["falling_anvil"] = {
"%s was smashed by a falling anvil!",
},
["falling_block"] = {
"%s was smashed by a falling block.",
"%s was buried under a falling block.",
},
["fall_damage"] = {
"%s fell from a high cliff.",
"%s took fatal fall damage.",
@ -144,9 +128,6 @@ minetest.register_on_dieplayer(function(player)
-- Fire
elseif minetest.get_item_group(node.name, "fire") ~= 0 then
msg = dmsg("fire", name)
-- Void
elseif node.name == "mcl_core:void" then
msg = dmsg("void", name)
-- Other
else
-- Killed by entity
@ -227,7 +208,7 @@ minetest.register_on_punchplayer(function(player, hitter)
start_damage_reset_countdown(player)
end)
-- To be called to notify this mod that a player has been damaged, with a custom death message if the player died
-- To be called BEFORE damaging a player. If the player died, then message will be used as the death message.
function mcl_death_messages.player_damage(player, message)
last_damages[player:get_player_name()] = { custom = true, message = message }
start_damage_reset_countdown(player)