Fix lava/fire/magmablock death message not transl.

This commit is contained in:
Wuzzy 2019-03-15 07:23:36 +01:00
parent f5cd9e3b98
commit 3f85e1c0da
1 changed files with 9 additions and 1 deletions

View File

@ -140,7 +140,15 @@ minetest.register_on_dieplayer(function(player, reason)
else
field_msg = field
end
msg = S(field_msg, name)
local textdomain
if highest_damage_def.mod_origin then
textdomain = highest_damage_def.mod_origin
else
textdomain = "mcl_death_messages"
end
-- We assume the textdomain of the death message in the node definition
-- equals the modname.
msg = minetest.translate(textdomain, field_msg, name)
end
elseif reason.type == "drown" then
msg = dmsg("drown", name)