localize damage type in armor examine description (#21807)
* localize damage type in armor examine description * format * change translation * add missing strings
This commit is contained in:
@@ -29,7 +29,8 @@ public abstract class SharedArmorSystem : EntitySystem
|
||||
args.Args.Damage = DamageSpecifier.ApplyModifierSet(args.Args.Damage, component.Modifiers);
|
||||
}
|
||||
|
||||
private void OnBorgDamageModify(EntityUid uid, ArmorComponent component, ref BorgModuleRelayedEvent<DamageModifyEvent> args)
|
||||
private void OnBorgDamageModify(EntityUid uid, ArmorComponent component,
|
||||
ref BorgModuleRelayedEvent<DamageModifyEvent> args)
|
||||
{
|
||||
args.Args.Damage = DamageSpecifier.ApplyModifierSet(args.Args.Damage, component.Modifiers);
|
||||
}
|
||||
@@ -58,8 +59,10 @@ public abstract class SharedArmorSystem : EntitySystem
|
||||
foreach (var coefficientArmor in armorModifiers.Coefficients)
|
||||
{
|
||||
msg.PushNewline();
|
||||
|
||||
var armorType = Loc.GetString("armor-damage-type-" + coefficientArmor.Key.ToLower());
|
||||
msg.AddMarkup(Loc.GetString("armor-coefficient-value",
|
||||
("type", coefficientArmor.Key),
|
||||
("type", armorType),
|
||||
("value", MathF.Round((1f - coefficientArmor.Value) * 100, 1))
|
||||
));
|
||||
}
|
||||
@@ -67,8 +70,10 @@ public abstract class SharedArmorSystem : EntitySystem
|
||||
foreach (var flatArmor in armorModifiers.FlatReduction)
|
||||
{
|
||||
msg.PushNewline();
|
||||
|
||||
var armorType = Loc.GetString("armor-damage-type-" + flatArmor.Key.ToLower());
|
||||
msg.AddMarkup(Loc.GetString("armor-reduction-value",
|
||||
("type", flatArmor.Key),
|
||||
("type", armorType),
|
||||
("value", flatArmor.Value)
|
||||
));
|
||||
}
|
||||
|
||||
@@ -4,3 +4,16 @@ armor-examinable-verb-message = Examine the armor values.
|
||||
armor-examine = It provides the following protection:
|
||||
armor-coefficient-value = - [color=yellow]{$type}[/color] damage reduced by [color=lightblue]{$value}%[/color].
|
||||
armor-reduction-value = - [color=yellow]{$type}[/color] damage reduced by [color=lightblue]{$value}[/color].
|
||||
armor-damage-type-blunt = Blunt
|
||||
armor-damage-type-slash = Slash
|
||||
armor-damage-type-piercing = Piercing
|
||||
armor-damage-type-heat = Heat
|
||||
armor-damage-type-radiation = Radiation
|
||||
armor-damage-type-caustic = Caustic
|
||||
armor-damage-type-bloodloss = Bloodloss
|
||||
armor-damage-type-asphyxiation = Asphyxiation
|
||||
armor-damage-type-cellular = Cellular
|
||||
armor-damage-type-cold = Cold
|
||||
armor-damage-type-poison = Poison
|
||||
armor-damage-type-shock = Shock
|
||||
armor-damage-type-structural = Structural
|
||||
|
||||
Reference in New Issue
Block a user