From 9e8d0a51ada162e80d66a9753b249f3ccb289088 Mon Sep 17 00:00:00 2001 From: Morb <14136326+Morb0@users.noreply.github.com> Date: Sat, 17 Sep 2022 20:34:53 +0300 Subject: [PATCH] Localize gases (#11376) --- Content.Shared/Atmos/Prototypes/GasPrototype.cs | 9 ++++++++- Resources/Locale/en-US/gases/gases.ftl | 9 +++++++++ Resources/Prototypes/Atmospherics/gases.yml | 16 ++++++++-------- 3 files changed, 25 insertions(+), 9 deletions(-) create mode 100644 Resources/Locale/en-US/gases/gases.ftl diff --git a/Content.Shared/Atmos/Prototypes/GasPrototype.cs b/Content.Shared/Atmos/Prototypes/GasPrototype.cs index 6047728d4a..bdc64eaadf 100644 --- a/Content.Shared/Atmos/Prototypes/GasPrototype.cs +++ b/Content.Shared/Atmos/Prototypes/GasPrototype.cs @@ -7,7 +7,14 @@ namespace Content.Shared.Atmos.Prototypes [Prototype("gas")] public sealed class GasPrototype : IPrototype { - [DataField("name")] public string Name { get; } = string.Empty; + private string _name = string.Empty; + + [DataField("name")] + public string Name + { + get => _name; + private set => _name = Loc.GetString(value); + } // TODO: Control gas amount necessary for overlay to appear // TODO: Add interfaces for gas behaviours e.g. breathing, burning diff --git a/Resources/Locale/en-US/gases/gases.ftl b/Resources/Locale/en-US/gases/gases.ftl new file mode 100644 index 0000000000..3166cd059b --- /dev/null +++ b/Resources/Locale/en-US/gases/gases.ftl @@ -0,0 +1,9 @@ +gases-oxygen = Oxygen +gases-nitrogen = Nitrogen +gases-co2 = Carbon Dioxide +gases-plasma = Plasma +gases-tritium = Tritium +gases-water-vapor = Water Vapor +gases-miasma = Miasma +gases-n2o = Nitrous Oxide +gases-frezon = Frezon diff --git a/Resources/Prototypes/Atmospherics/gases.yml b/Resources/Prototypes/Atmospherics/gases.yml index 00ce9bbe6f..564392a26a 100644 --- a/Resources/Prototypes/Atmospherics/gases.yml +++ b/Resources/Prototypes/Atmospherics/gases.yml @@ -1,6 +1,6 @@ - type: gas id: 0 - name: Oxygen + name: gases-oxygen specificHeat: 20 heatCapacityRatio: 1.4 molarMass: 32 @@ -10,7 +10,7 @@ - type: gas id: 1 - name: Nitrogen + name: gases-nitrogen specificHeat: 30 heatCapacityRatio: 1.4 molarMass: 28 @@ -20,7 +20,7 @@ - type: gas id: 2 - name: Carbon Dioxide + name: gases-co2 specificHeat: 30 heatCapacityRatio: 1.3 molarMass: 44 @@ -30,7 +30,7 @@ - type: gas id: 3 - name: Plasma + name: gases-plasma specificHeat: 200 heatCapacityRatio: 1.7 molarMass: 120 @@ -42,7 +42,7 @@ - type: gas id: 4 - name: Tritium + name: gases-tritium specificHeat: 10 heatCapacityRatio: 1.3 molarMass: 6 @@ -54,7 +54,7 @@ - type: gas id: 5 - name: Water Vapor + name: gases-water-vapor specificHeat: 40 heatCapacityRatio: 1.33 molarMass: 18 @@ -66,7 +66,7 @@ - type: gas id: 6 - name: Miasma + name: gases-miasma specificHeat: 20 heatCapacityRatio: 1.4 molarMass: 44 @@ -80,7 +80,7 @@ - type: gas id: 7 - name: NitrousOxide + name: gases-n2o specificHeat: 40 heatCapacityRatio: 1.3 molarMass: 44