From e397707cc7495dfe1f114a88f28e95a71b744a96 Mon Sep 17 00:00:00 2001 From: Morb <14136326+Morb0@users.noreply.github.com> Date: Sat, 15 Oct 2022 07:18:33 +0300 Subject: [PATCH] Localize diseases (#11916) --- Content.Shared/Disease/DiseasePrototype.cs | 8 ++++++- .../Locale/en-US/disease/disease-proto.ftl | 21 ++++++++++++++++++ Resources/Prototypes/Diseases/infectious.yml | 22 +++++++++---------- .../Prototypes/Diseases/noninfectious.yml | 6 ++--- Resources/Prototypes/Diseases/zombie.yml | 4 ++-- 5 files changed, 44 insertions(+), 17 deletions(-) create mode 100644 Resources/Locale/en-US/disease/disease-proto.ftl diff --git a/Content.Shared/Disease/DiseasePrototype.cs b/Content.Shared/Disease/DiseasePrototype.cs index 2ec8c89808..045db8a813 100644 --- a/Content.Shared/Disease/DiseasePrototype.cs +++ b/Content.Shared/Disease/DiseasePrototype.cs @@ -11,12 +11,18 @@ namespace Content.Shared.Disease [DataDefinition] public sealed class DiseasePrototype : IPrototype, IInheritingPrototype { + private string _name = string.Empty; + [ViewVariables] [IdDataFieldAttribute] public string ID { get; } = default!; [DataField("name")] - public string Name { get; } = string.Empty; + public string Name + { + get => _name; + private set => _name = Loc.GetString(value); + } [ParentDataFieldAttribute(typeof(AbstractPrototypeIdArraySerializer))] public string[]? Parents { get; private set; } diff --git a/Resources/Locale/en-US/disease/disease-proto.ftl b/Resources/Locale/en-US/disease/disease-proto.ftl new file mode 100644 index 0000000000..2845e953c9 --- /dev/null +++ b/Resources/Locale/en-US/disease/disease-proto.ftl @@ -0,0 +1,21 @@ +# Noninfectious +disease-proto-ultragigacancer = ultragigacancer +disease-proto-spectral-tiredness = spectral tiredness +disease-proto-lung-cancer = Stage IIIA Lung Cancer + +# Infectious +disease-proto-space-cold = space cold +disease-proto-vent-cough = vent cough +disease-proto-space-flu = space flu +disease-proto-bird-flew = bird flew +disease-proto-robovirus = Van Ausdall's Robovirus +disease-proto-amiv = AMIV +disease-proto-amirmir = Memetic Amirmir +disease-proto-bleeders = Bleeder's Bite +disease-proto-plague = plague +disease-proto-owonavirus = OwOnavirus +disease-proto-tongue-twister = Tongue Twister + +# Zombie +disease-proto-zombie = Zombie Virus +disease-proto-zombie-passive = Zombie Virus diff --git a/Resources/Prototypes/Diseases/infectious.yml b/Resources/Prototypes/Diseases/infectious.yml index 21497a1250..87168a977f 100644 --- a/Resources/Prototypes/Diseases/infectious.yml +++ b/Resources/Prototypes/Diseases/infectious.yml @@ -1,6 +1,6 @@ - type: disease id: SpaceCold - name: space cold + name: disease-proto-space-cold cureResist: 0 effects: - !type:DiseaseAdjustReagent @@ -25,7 +25,7 @@ - type: disease id: VentCough - name: vent cough + name: disease-proto-vent-cough effects: - !type:DiseasePopUp probability: 0.025 @@ -51,7 +51,7 @@ - type: disease id: SpaceFlu - name: space flu + name: disease-proto-space-flu cureResist: 0.08 effects: - !type:DiseaseVomit @@ -73,7 +73,7 @@ - type: disease id: BirdFlew - name: bird flew + name: disease-proto-bird-flew cureResist: 0.08 effects: - !type:DiseaseVomit @@ -96,7 +96,7 @@ - type: disease id: VanAusdallsRobovirus - name: Van Ausdall's Robovirus + name: disease-proto-robovirus cureResist: 0.1 effects: - !type:DiseaseAdjustReagent @@ -116,7 +116,7 @@ - type: disease id: AMIV - name: AMIV + name: disease-proto-amiv cureResist: 0.10 stages: - 0 @@ -210,7 +210,7 @@ - type: disease id: MemeticAmirmir - name: Memetic Amirmir + name: disease-proto-amirmir effects: - !type:DiseaseGenericStatusEffect probability: 0.015 @@ -226,7 +226,7 @@ - type: disease id: BleedersBite - name: Bleeder's Bite + name: disease-proto-bleeders effects: - !type:DiseaseAdjustReagent reagent: TranexamicAcid @@ -250,7 +250,7 @@ - type: disease id: Plague - name: plague + name: disease-proto-plague cureResist: 0.1 effects: - !type:DiseaseVomit @@ -275,7 +275,7 @@ - type: disease id: OwOnavirus - name: OwOnavirus + name: disease-proto-owonavirus cureResist: 0.25 effects: - !type:DiseaseGenericStatusEffect @@ -303,7 +303,7 @@ - type: disease id: TongueTwister - name: Tongue Twister + name: disease-proto-tongue-twister cureResist: 0.1 effects: - !type:DiseaseGenericStatusEffect diff --git a/Resources/Prototypes/Diseases/noninfectious.yml b/Resources/Prototypes/Diseases/noninfectious.yml index e8d360da47..91d691fcc5 100644 --- a/Resources/Prototypes/Diseases/noninfectious.yml +++ b/Resources/Prototypes/Diseases/noninfectious.yml @@ -1,6 +1,6 @@ - type: disease id: Ultragigacancer - name: ultragigacancer + name: disease-proto-ultragigacancer infectious: false cureResist: 0.15 effects: @@ -20,7 +20,7 @@ - type: disease id: SpectralTiredness - name: spectral tiredness + name: disease-proto-spectral-tiredness infectious: false effects: - !type:DiseaseGenericStatusEffect @@ -47,7 +47,7 @@ - type: disease id: StageIIIALungCancer - name: Stage IIIA Lung Cancer + name: disease-proto-lung-cancer infectious: false cureResist: 1.0 effects: diff --git a/Resources/Prototypes/Diseases/zombie.yml b/Resources/Prototypes/Diseases/zombie.yml index 086685c02d..be6122d7c9 100644 --- a/Resources/Prototypes/Diseases/zombie.yml +++ b/Resources/Prototypes/Diseases/zombie.yml @@ -1,6 +1,6 @@ - type: disease id: ActiveZombieVirus - name: Zombie Virus + name: disease-proto-zombie infectious: false cureResist: 0.2 effects: @@ -27,7 +27,7 @@ - type: disease id: PassiveZombieVirus - name: Zombie Virus + name: disease-proto-zombie-passive infectious: false cureResist: 1 #no cure. Death is your cure. effects: