Localization of the Salvage Expedition Console (#30339)
* Localization of the Salvage Expedition Console * Localization of the Salvage Expedition Console 2
This commit is contained in:
@@ -102,12 +102,21 @@ public sealed class SalvageExpeditionConsoleBoundUserInterface : BoundUserInterf
|
||||
|
||||
offering.AddContent(new Label
|
||||
{
|
||||
Text = faction,
|
||||
Text = string.IsNullOrWhiteSpace(Loc.GetString(_protoManager.Index<SalvageFactionPrototype>(faction).Description))
|
||||
? LogAndReturnDefaultFactionDescription(faction)
|
||||
: Loc.GetString(_protoManager.Index<SalvageFactionPrototype>(faction).Description),
|
||||
FontColorOverride = StyleNano.NanoGold,
|
||||
HorizontalAlignment = Control.HAlignment.Left,
|
||||
Margin = new Thickness(0f, 0f, 0f, 5f),
|
||||
});
|
||||
|
||||
string LogAndReturnDefaultFactionDescription(string faction)
|
||||
{
|
||||
Logger.Error($"Description is null or white space for SalvageFactionPrototype: {faction}");
|
||||
return Loc.GetString(_protoManager.Index<SalvageFactionPrototype>(faction).ID);
|
||||
}
|
||||
|
||||
|
||||
// Duration
|
||||
offering.AddContent(new Label
|
||||
{
|
||||
@@ -132,12 +141,20 @@ public sealed class SalvageExpeditionConsoleBoundUserInterface : BoundUserInterf
|
||||
|
||||
offering.AddContent(new Label
|
||||
{
|
||||
Text = Loc.GetString(_protoManager.Index<SalvageBiomeModPrototype>(biome).ID),
|
||||
Text = string.IsNullOrWhiteSpace(Loc.GetString(_protoManager.Index<SalvageBiomeModPrototype>(biome).Description))
|
||||
? LogAndReturnDefaultBiomDescription(biome)
|
||||
: Loc.GetString(_protoManager.Index<SalvageBiomeModPrototype>(biome).Description),
|
||||
FontColorOverride = StyleNano.NanoGold,
|
||||
HorizontalAlignment = Control.HAlignment.Left,
|
||||
Margin = new Thickness(0f, 0f, 0f, 5f),
|
||||
});
|
||||
|
||||
string LogAndReturnDefaultBiomDescription(string biome)
|
||||
{
|
||||
Logger.Error($"Description is null or white space for SalvageBiomeModPrototype: {biome}");
|
||||
return Loc.GetString(_protoManager.Index<SalvageBiomeModPrototype>(biome).ID);
|
||||
}
|
||||
|
||||
// Modifiers
|
||||
offering.AddContent(new Label
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ public interface ISalvageMod
|
||||
/// <summary>
|
||||
/// Player-friendly version describing this modifier.
|
||||
/// </summary>
|
||||
string Description { get; }
|
||||
LocId Description { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Cost for difficulty modifiers.
|
||||
|
||||
@@ -17,7 +17,7 @@ public sealed partial class SalvageAirMod : IPrototype, IBiomeSpecificMod
|
||||
|
||||
/// <inheritdoc/>
|
||||
[DataField("desc")]
|
||||
public string Description { get; private set; } = string.Empty;
|
||||
public LocId Description { get; private set; } = string.Empty;
|
||||
|
||||
/// <inheritdoc/>
|
||||
[DataField("cost")]
|
||||
|
||||
@@ -12,7 +12,7 @@ public sealed partial class SalvageBiomeModPrototype : IPrototype, ISalvageMod
|
||||
{
|
||||
[IdDataField] public string ID { get; } = default!;
|
||||
|
||||
[DataField("desc")] public string Description { get; private set; } = string.Empty;
|
||||
[DataField("desc")] public LocId Description { get; private set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Cost for difficulty modifiers.
|
||||
|
||||
@@ -10,7 +10,7 @@ public sealed partial class SalvageDungeonModPrototype : IPrototype, IBiomeSpeci
|
||||
{
|
||||
[IdDataField] public string ID { get; } = default!;
|
||||
|
||||
[DataField("desc")] public string Description { get; private set; } = string.Empty;
|
||||
[DataField("desc")] public LocId Description { get; private set; } = string.Empty;
|
||||
|
||||
/// <inheridoc/>
|
||||
[DataField("cost")]
|
||||
|
||||
@@ -8,7 +8,7 @@ public sealed partial class SalvageLightMod : IPrototype, IBiomeSpecificMod
|
||||
{
|
||||
[IdDataField] public string ID { get; } = default!;
|
||||
|
||||
[DataField("desc")] public string Description { get; private set; } = string.Empty;
|
||||
[DataField("desc")] public LocId Description { get; private set; } = string.Empty;
|
||||
|
||||
/// <inheritdoc/>
|
||||
[DataField("cost")]
|
||||
|
||||
@@ -10,7 +10,7 @@ public sealed partial class SalvageMod : IPrototype, ISalvageMod
|
||||
{
|
||||
[IdDataField] public string ID { get; } = default!;
|
||||
|
||||
[DataField("desc")] public string Description { get; private set; } = string.Empty;
|
||||
[DataField("desc")] public LocId Description { get; private set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Cost for difficulty modifiers.
|
||||
|
||||
@@ -8,7 +8,7 @@ public sealed partial class SalvageTemperatureMod : IPrototype, IBiomeSpecificMo
|
||||
{
|
||||
[IdDataField] public string ID { get; } = default!;
|
||||
|
||||
[DataField("desc")] public string Description { get; private set; } = string.Empty;
|
||||
[DataField("desc")] public LocId Description { get; private set; } = string.Empty;
|
||||
|
||||
/// <inheritdoc/>
|
||||
[DataField("cost")]
|
||||
|
||||
@@ -10,7 +10,7 @@ public sealed partial class SalvageWeatherMod : IPrototype, IBiomeSpecificMod
|
||||
{
|
||||
[IdDataField] public string ID { get; } = default!;
|
||||
|
||||
[DataField("desc")] public string Description { get; private set; } = string.Empty;
|
||||
[DataField("desc")] public LocId Description { get; private set; } = string.Empty;
|
||||
|
||||
/// <inheritdoc/>
|
||||
[DataField("cost")]
|
||||
|
||||
@@ -7,7 +7,7 @@ public sealed partial class SalvageFactionPrototype : IPrototype
|
||||
{
|
||||
[IdDataField] public string ID { get; } = default!;
|
||||
|
||||
[DataField("desc")] public string Description { get; private set; } = string.Empty;
|
||||
[DataField("desc")] public LocId Description { get; private set; } = string.Empty;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("entries", required: true)]
|
||||
public List<SalvageMobEntry> MobGroups = new();
|
||||
|
||||
@@ -55,18 +55,18 @@ public abstract partial class SharedSalvageSystem : EntitySystem
|
||||
|
||||
if (air.Description != string.Empty)
|
||||
{
|
||||
mods.Add(air.Description);
|
||||
mods.Add(Loc.GetString(air.Description));
|
||||
}
|
||||
|
||||
// only show the description if there is an atmosphere since wont matter otherwise
|
||||
if (temp.Description != string.Empty && !air.Space)
|
||||
{
|
||||
mods.Add(temp.Description);
|
||||
mods.Add(Loc.GetString(temp.Description));
|
||||
}
|
||||
|
||||
if (light.Description != string.Empty)
|
||||
{
|
||||
mods.Add(light.Description);
|
||||
mods.Add(Loc.GetString(light.Description));
|
||||
}
|
||||
|
||||
var duration = TimeSpan.FromSeconds(CfgManager.GetCVar(CCVars.SalvageExpeditionDuration));
|
||||
|
||||
@@ -32,3 +32,34 @@ salvage-expedition-announcement-countdown-seconds = {$duration} seconds remainin
|
||||
salvage-expedition-announcement-dungeon = Dungeon is located {$direction}.
|
||||
salvage-expedition-completed = Expedition is completed.
|
||||
salvage-expedition-reward-description = Mission completion reward
|
||||
|
||||
# Salvage biome mod
|
||||
salvage-biome-mod-caves = Caves
|
||||
salvage-biome-mod-grasslands = Grasslands
|
||||
salvage-biome-mod-snow = Snow
|
||||
salvage-biome-mod-lava = Lava
|
||||
|
||||
# Salvage mods
|
||||
salvage-light-mod-daylight = Daylight
|
||||
salvage-light-mod-evening = Evening
|
||||
salvage-light-mod-night = Night time
|
||||
|
||||
salvage-temperature-mod-room-temperature = Room temperature
|
||||
salvage-temperature-mod-hot = Hot
|
||||
salvage-temperature-mod-high-temperature = High temperature
|
||||
salvage-temperature-mod-extreme-heat = Extreme heat
|
||||
salvage-temperature-mod-cold = Cold
|
||||
salvage-temperature-mod-low-temperature = Low temperature
|
||||
salvage-temperature-mod-extreme-cold = Extreme cold
|
||||
|
||||
salvage-air-mod-no-atmosphere = No atmosphere
|
||||
salvage-air-mod-breathable-atmosphere = Breathable atmosphere
|
||||
salvage-air-mod-dangerous-atmosphere = Dangerous atmosphere
|
||||
salvage-air-mod-toxic-atmosphere = Toxic atmosphere
|
||||
salvage-air-mod-volatile-atmosphere = Volatile atmosphere
|
||||
|
||||
salvage-dungeon-mod-lava-brig = Lava Brig
|
||||
salvage-dungeon-mod-snowy-labs = Snowy labs
|
||||
salvage-dungeon-mod-experiment = Experiment
|
||||
salvage-dungeon-mod-haunted = Haunted
|
||||
salvage-dungeon-mod-mineshaft = Mineshaft
|
||||
|
||||
2
Resources/Locale/en-US/procedural/salvage-faction.ftl
Normal file
2
Resources/Locale/en-US/procedural/salvage-faction.ftl
Normal file
@@ -0,0 +1,2 @@
|
||||
salvage-faction-xenos = Xenos
|
||||
salvage-faction-carps = Carps
|
||||
@@ -1,5 +1,6 @@
|
||||
- type: salvageFaction
|
||||
id: Xenos
|
||||
desc: salvage-faction-xenos
|
||||
entries:
|
||||
- proto: MobXeno
|
||||
- proto: MobXenoDrone
|
||||
@@ -24,6 +25,7 @@
|
||||
|
||||
- type: salvageFaction
|
||||
id: Carps
|
||||
desc: salvage-faction-carps
|
||||
entries:
|
||||
- proto: MobCarpDungeon
|
||||
# These do too much damage for salvage, need nerfs
|
||||
|
||||
@@ -7,19 +7,23 @@
|
||||
# Biome mods -> at least 1 required
|
||||
- type: salvageBiomeMod
|
||||
id: Caves
|
||||
desc: salvage-biome-mod-caves
|
||||
biome: Caves
|
||||
|
||||
- type: salvageBiomeMod
|
||||
id: Grasslands
|
||||
desc: salvage-biome-mod-grasslands
|
||||
biome: Grasslands
|
||||
|
||||
- type: salvageBiomeMod
|
||||
id: Snow
|
||||
desc: salvage-biome-mod-snow
|
||||
cost: 1
|
||||
biome: Snow
|
||||
|
||||
- type: salvageBiomeMod
|
||||
id: Lava
|
||||
desc: salvage-biome-mod-lava
|
||||
cost: 2
|
||||
biome: Lava
|
||||
|
||||
@@ -32,36 +36,38 @@
|
||||
# Light mods -> required
|
||||
- type: salvageLightMod
|
||||
id: Daylight
|
||||
desc: Daylight
|
||||
desc: salvage-light-mod-daylight
|
||||
color: "#D8B059"
|
||||
biomes:
|
||||
- Grasslands
|
||||
|
||||
- type: salvageLightMod
|
||||
id: Lavalight
|
||||
desc: Daylight
|
||||
desc: salvage-light-mod-daylight
|
||||
color: "#A34931"
|
||||
biomes:
|
||||
- Lava
|
||||
|
||||
- type: salvageLightMod
|
||||
id: Evening
|
||||
desc: Evening
|
||||
desc: salvage-light-mod-evening
|
||||
color: "#2b3143"
|
||||
|
||||
- type: salvageLightMod
|
||||
id: Night
|
||||
desc: Night time
|
||||
desc: salvage-light-mod-night
|
||||
cost: 1
|
||||
color: null
|
||||
|
||||
# Temperatures
|
||||
- type: salvageTemperatureMod
|
||||
id: RoomTemp
|
||||
desc: salvage-temperature-mod-room-temperature
|
||||
cost: 0
|
||||
|
||||
- type: salvageTemperatureMod
|
||||
id: Hot
|
||||
desc: salvage-temperature-mod-hot
|
||||
cost: 1
|
||||
temperature: 323.15 # 50C
|
||||
biomes:
|
||||
@@ -72,7 +78,7 @@
|
||||
|
||||
- type: salvageTemperatureMod
|
||||
id: Burning
|
||||
desc: High temperature
|
||||
desc: salvage-temperature-mod-high-temperature
|
||||
cost: 2
|
||||
temperature: 423.15 # 200C
|
||||
biomes:
|
||||
@@ -82,7 +88,7 @@
|
||||
|
||||
- type: salvageTemperatureMod
|
||||
id: Melting
|
||||
desc: Extreme heat
|
||||
desc: salvage-temperature-mod-extreme-heat
|
||||
cost: 4
|
||||
temperature: 1273.15 # 1000C hot hot hot
|
||||
biomes:
|
||||
@@ -90,6 +96,7 @@
|
||||
|
||||
- type: salvageTemperatureMod
|
||||
id: Cold
|
||||
desc: salvage-temperature-mod-cold
|
||||
cost: 1
|
||||
temperature: 275.15 # 2C
|
||||
biomes:
|
||||
@@ -100,7 +107,7 @@
|
||||
|
||||
- type: salvageTemperatureMod
|
||||
id: Tundra
|
||||
desc: Low temperature
|
||||
desc: salvage-temperature-mod-low-temperature
|
||||
cost: 2
|
||||
temperature: 263.15 # -40C
|
||||
biomes:
|
||||
@@ -109,7 +116,7 @@
|
||||
|
||||
- type: salvageTemperatureMod
|
||||
id: Frozen
|
||||
desc: Extreme cold
|
||||
desc: salvage-temperature-mod-extreme-cold
|
||||
cost: 4
|
||||
temperature: 123.15 # -150C
|
||||
biomes:
|
||||
@@ -118,7 +125,7 @@
|
||||
# Air mixtures
|
||||
- type: salvageAirMod
|
||||
id: Space
|
||||
desc: No atmosphere
|
||||
desc: salvage-air-mod-no-atmosphere
|
||||
space: true
|
||||
cost: 2
|
||||
biomes:
|
||||
@@ -128,6 +135,7 @@
|
||||
- type: salvageAirMod
|
||||
id: Breathable
|
||||
cost: 0
|
||||
desc: salvage-air-mod-breathable-atmosphere
|
||||
gases:
|
||||
- 21.824779 # oxygen
|
||||
- 82.10312 # nitrogen
|
||||
@@ -135,7 +143,7 @@
|
||||
- type: salvageAirMod
|
||||
id: Sleepy
|
||||
cost: 1
|
||||
desc: Dangerous atmosphere
|
||||
desc: salvage-air-mod-dangerous-atmosphere
|
||||
gases:
|
||||
- 21.824779 # oxygen
|
||||
- 72.10312 # nitrogen
|
||||
@@ -155,7 +163,7 @@
|
||||
- type: salvageAirMod
|
||||
id: Poisoned
|
||||
cost: 2
|
||||
desc: Dangerous atmosphere
|
||||
desc: salvage-air-mod-dangerous-atmosphere
|
||||
gases:
|
||||
- 21.824779 # oxygen
|
||||
- 77.10312 # nitrogen
|
||||
@@ -170,7 +178,7 @@
|
||||
- type: salvageAirMod
|
||||
id: Poison
|
||||
cost: 3
|
||||
desc: Toxic atmosphere
|
||||
desc: salvage-air-mod-toxic-atmosphere
|
||||
gases:
|
||||
- 21.824779 # oxygen
|
||||
- 0
|
||||
@@ -183,7 +191,7 @@
|
||||
- type: salvageAirMod
|
||||
id: Plasma
|
||||
cost: 4
|
||||
desc: Toxic atmosphere
|
||||
desc: salvage-air-mod-toxic-atmosphere
|
||||
gases:
|
||||
- 0
|
||||
- 0
|
||||
@@ -196,7 +204,7 @@
|
||||
- type: salvageAirMod
|
||||
id: Burnable
|
||||
cost: 5
|
||||
desc: Volatile atmosphere
|
||||
desc: salvage-air-mod-volatile-atmosphere
|
||||
gases:
|
||||
- 21.824779 # oxygen
|
||||
- 0
|
||||
@@ -220,6 +228,7 @@
|
||||
# For now just simple 1-dungeon setups
|
||||
- type: salvageDungeonMod
|
||||
id: Experiment
|
||||
desc: salvage-dungeon-mod-experiment
|
||||
proto: Experiment
|
||||
biomes:
|
||||
#- LowDesert
|
||||
@@ -227,24 +236,28 @@
|
||||
|
||||
- type: salvageDungeonMod
|
||||
id: LavaBrig
|
||||
desc: salvage-dungeon-mod-lava-brig
|
||||
proto: LavaBrig
|
||||
biomes:
|
||||
- Lava
|
||||
|
||||
- type: salvageDungeonMod
|
||||
id: Mineshaft
|
||||
desc: salvage-dungeon-mod-mineshaft
|
||||
proto: Mineshaft
|
||||
biomes:
|
||||
- Caves
|
||||
|
||||
- type: salvageDungeonMod
|
||||
id: SnowyLabs
|
||||
desc: salvage-dungeon-mod-snowy-labs
|
||||
proto: SnowyLabs
|
||||
biomes:
|
||||
- Snow
|
||||
|
||||
- type: salvageDungeonMod
|
||||
id: Haunted
|
||||
desc: salvage-dungeon-mod-haunted
|
||||
proto: Haunted
|
||||
biomes:
|
||||
- Caves
|
||||
|
||||
Reference in New Issue
Block a user