Added localization of groups and types: damage, metabolism (#27368)

* Added localization of groups and types: damage, metabolism (displayed in the guide book). The text for the health analyzer, weapon damage inspection is now taken from damage prototypes

* fix damage tests

* fix damage test yml

* fix damage test prototypes

* Update Content.Shared/Damage/Prototypes/DamageGroupPrototype.cs

* Update Content.Shared/Damage/Prototypes/DamageTypePrototype.cs

---------

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
KrasnoshchekovPavel
2024-04-28 07:48:19 +03:00
committed by GitHub
parent f5b8b5fbdc
commit 3fcbbc0732
24 changed files with 150 additions and 51 deletions

View File

@@ -1,4 +1,4 @@
using Content.Shared.Body.Prototypes;
using Content.Shared.Body.Prototypes;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.FixedPoint;
using JetBrains.Annotations;
@@ -74,7 +74,7 @@ namespace Content.Server.Chemistry.ReagentEffects
return Loc.GetString("reagent-effect-guidebook-adjust-reagent-group",
("chance", Probability),
("deltasign", MathF.Sign(Amount.Float())),
("group", groupProto.ID),
("group", groupProto.LocalizedName),
("amount", MathF.Abs(Amount.Float())));
}

View File

@@ -74,7 +74,7 @@ namespace Content.Server.Chemistry.ReagentEffects
damages.Add(
Loc.GetString("health-change-display",
("kind", group.ID),
("kind", group.LocalizedName),
("amount", MathF.Abs(amount.Float())),
("deltasign", sign)
));
@@ -96,7 +96,7 @@ namespace Content.Server.Chemistry.ReagentEffects
damages.Add(
Loc.GetString("health-change-display",
("kind", kind),
("kind", prototype.Index<DamageTypePrototype>(kind).LocalizedName),
("amount", MathF.Abs(amount.Float())),
("deltasign", sign)
));