Remove/Deprecate KillSource::Environment

This commit is contained in:
juliancoffee 2024-02-02 22:31:41 +02:00
parent 13011606d9
commit 96681cd448
5 changed files with 8 additions and 12 deletions

View File

@ -47,7 +47,6 @@ hud-chat-npc_other_kill_msg = { $attacker } killed [{ $victim }]
## Other deaths
hud-chat-environmental_kill_msg = [{ $name }] died in { $environment }
hud-chat-fall_kill_msg = [{ $name }] died from fall damage
hud-chat-suicide_msg = [{ $name }] died from self-inflicted wounds
hud-chat-default_death_msg = [{ $name }] died

View File

@ -2940,7 +2940,6 @@ impl Client {
add_data_of(attacker_uid);
},
KillSource::NonPlayer(_, _)
| KillSource::Environment(_)
| KillSource::FallDamage
| KillSource::Suicide
| KillSource::NonExistent(_)

View File

@ -73,7 +73,10 @@ pub enum KillSource {
Player(Uid, KillType),
NonPlayer(String, KillType),
NonExistent(KillType),
Environment(String),
// #[deprecated = "if you use it, please expose enum for translators"]
//
// when I say 'enum' I mean it, not just arg to Content.
// Environment(String),
FallDamage,
Suicide,
Other,

View File

@ -22,7 +22,10 @@ pub enum KillSource {
Player(PlayerInfo, KillType),
NonPlayer(String, KillType),
NonExistent(KillType),
Environment(String),
// #[deprecated = "if you use it, please expose enum for translators"]
//
// when I say 'enum' I mean it, not just arg to Content.
// Environment(String),
FallDamage,
Suicide,
Other,
@ -160,7 +163,6 @@ impl ChatExporter {
},
comp::chat::KillSource::NonPlayer(str, t) => KillSource::NonPlayer(str, t),
comp::chat::KillSource::NonExistent(t) => KillSource::NonExistent(t),
comp::chat::KillSource::Environment(str) => KillSource::Environment(str),
comp::chat::KillSource::FallDamage => KillSource::FallDamage,
comp::chat::KillSource::Suicide => KillSource::Suicide,
comp::chat::KillSource::Other => KillSource::Other,

View File

@ -207,13 +207,6 @@ fn localize_kill_message(
})
},
// Other deaths
KillSource::Environment(environment) => {
localization.get_msg_ctx("hud-chat-environment_kill_msg", &i18n::fluent_args! {
"name" => name_format(victim),
"victim_gender" => gender_str(victim),
"environment" => environment,
})
},
KillSource::FallDamage => {
localization.get_msg_ctx("hud-chat-fall_kill_msg", &i18n::fluent_args! {
"name" => name_format(victim),