Reagents localization (#7916)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Alex Evgrashin
2022-05-12 14:06:01 +03:00
committed by GitHub
parent 4ef8bfff46
commit 860db943e1
47 changed files with 1644 additions and 804 deletions

View File

@@ -184,7 +184,7 @@ namespace Content.Server.Body.Systems
if (effect.ShouldLog)
{
_logSystem.Add(LogType.ReagentEffect, effect.LogImpact,
$"Metabolism effect {effect.GetType().Name:effect} of reagent {args.Reagent.Name:reagent} applied on entity {actualEntity:entity} at {Transform(actualEntity).Coordinates:coordinates}");
$"Metabolism effect {effect.GetType().Name:effect} of reagent {args.Reagent.LocalizedName:reagent} applied on entity {actualEntity:entity} at {Transform(actualEntity).Coordinates:coordinates}");
}
effect.Effect(args);

View File

@@ -87,7 +87,7 @@ public sealed partial class SolutionContainerSystem : EntitySystem
("wordedAmount", Loc.GetString(solutionHolder.Contents.Count == 1
? "shared-solution-container-component-on-examine-worded-amount-one-reagent"
: "shared-solution-container-component-on-examine-worded-amount-multiple-reagents")),
("desc", Loc.GetString(proto.PhysicalDescription))));
("desc", proto.LocalizedPhysicalDescription)));
}
public void UpdateAppearance(EntityUid uid, Solution solution,

View File

@@ -55,9 +55,9 @@ namespace Content.Server.Chemistry.EntitySystems
sprite?.LayerSetSprite(0, spriteSpec);
}
string val = proto.Name + " glass";
string val = proto.LocalizedName + " glass";
EntityManager.GetComponent<MetaDataComponent>(owner).EntityName = val;
EntityManager.GetComponent<MetaDataComponent>(owner).EntityDescription = proto.Description;
EntityManager.GetComponent<MetaDataComponent>(owner).EntityDescription = proto.LocalizedDescription;
component.CurrentReagent = proto;
component.Transformed = true;
}

View File

@@ -35,7 +35,7 @@ namespace Content.Server.Disease.Cures
var prototypeMan = IoCManager.Resolve<IPrototypeManager>();
if (Reagent == null || !prototypeMan.TryIndex<ReagentPrototype>(Reagent, out var reagentProt))
return string.Empty;
return (Loc.GetString("diagnoser-cure-reagent", ("units", Min), ("reagent", reagentProt.Name)));
return (Loc.GetString("diagnoser-cure-reagent", ("units", Min), ("reagent", reagentProt.LocalizedName)));
}
}
}

View File

@@ -38,10 +38,10 @@ public sealed class ReagentEntry
public ReagentEntry(ReagentPrototype proto)
{
Id = proto.ID;
Name = proto.Name;
Name = proto.LocalizedName;
Group = proto.Group;
Description = proto.Description;
PhysicalDescription = proto.PhysicalDescription;
Description = proto.LocalizedDescription;
PhysicalDescription = proto.LocalizedPhysicalDescription;
SubstanceColor = proto.SubstanceColor.ToHex();
Metabolisms = proto.Metabolisms;
}