Add some arrow-related death messages

This commit is contained in:
Wuzzy 2019-12-09 10:11:15 +01:00
parent 84ff24f8ed
commit e2fb3a562d
3 changed files with 32 additions and 5 deletions

View file

@ -7,11 +7,23 @@ mcl_death_messages = {}
local msgs = {
["arrow"] = {
N("@1 was fatally hit by an arrow."),
N("@1 has been killed with an arrow."),
N("@1 has been killed by an arrow."),
},
["arrow_name"] = {
N("@1 was shot by an arrow from @2."),
},
["arrow_skeleton"] = {
N("@1 was shot by an arrow from a skeleton."),
},
["arrow_stray"] = {
N("@1 was shot by an arrow from a stray."),
},
["arrow_illusioner"] = {
N("@1 was shot by an arrow from an illusioner."),
},
["arrow_mob"] = {
N("@1 was shot by an arrow."),
},
["drown"] = {
N("@1 forgot to breathe."),
N("@1 drowned."),
@ -186,15 +198,22 @@ minetest.register_on_dieplayer(function(player, reason)
if hitter:get_luaentity()._shooter then
shooter = hitter:get_luaentity()._shooter
end
local s_ent = shooter:get_luaentity()
if shooter == nil then
msg = dmsg("arrow", name)
elseif shooter:is_player() then
msg = dmsg("arrow_name", name, shooter:get_player_name())
elseif shooter:get_luaentity()._cmi_is_mob then
if shooter:get_luaentity().nametag ~= "" then
elseif s_ent._cmi_is_mob then
if s_ent.nametag ~= "" then
msg = dmsg("arrow_name", name, shooter:get_player_name())
elseif s_ent.name == "mobs_mc:skeleton" then
msg = dmsg("arrow_skeleton", name)
elseif s_ent.name == "mobs_mc:stray" then
msg = dmsg("arrow_stray", name)
elseif s_ent.name == "mobs_mc:illusioner" then
msg = dmsg("arrow_illusioner", name)
else
msg = dmsg("arrow", name)
msg = dmsg("arrow_mob", name)
end
else
msg = dmsg("arrow", name)

View file

@ -1,7 +1,11 @@
# textdomain: mcl_death_messages
@1 was fatally hit by an arrow.=@1 wurde tödlich von einem Pfeil getroffen.
@1 has been killed with an arrow.=@1 wurde mit einem Pfeil getötet.
@1 has been killed by an arrow.=@1 wurde von einem Pfeil getötet.
@1 was shot by an arrow from @2.=@1 wurde mit einem Pfeil von @2 abgeschossen.
@1 was shot by an arrow from a skeleton.=@1 wurde von einem Skelett mit Pfeil und Bogen abgeschossen.
@1 was shot by an arrow from a stray.=@1 wurde von einem Eiswanderer mit Pfeil und Bogen abgeschossen.
@1 was shot by an arrow from an illusioner.=@1 wurde von einem Illusionisten mit Pfeil und Bogen abgeschossen.
@1 was shot by an arrow.=@1 wurde mit einem Pfeil abgeschossen.
@1 forgot to breathe.=@1 vergaß, zu atmen.
@1 drowned.=@1 ertrank.
@1 ran out of oxygen.=@1 ging die Luft aus.

View file

@ -2,6 +2,10 @@
@1 was fatally hit by an arrow.=
@1 has been killed with an arrow.=
@1 was shot by an arrow from @2.=
@1 was shot by an arrow from a skeleton.=
@1 was shot by an arrow from a stray.=
@1 was shot by an arrow from an illusioner.=
@1 was shot by an arrow.=
@1 forgot to breathe.=
@1 drowned.=
@1 ran out of oxygen.=