Replaced some AddMarkups with AddMarkupOrThrow (#30632)

* First commit

* Silly me

* bruh
This commit is contained in:
beck-thompson
2024-08-10 20:06:33 -07:00
committed by GitHub
parent 220aff21eb
commit ee922e37f6
7 changed files with 18 additions and 20 deletions

View File

@@ -53,15 +53,14 @@ public abstract class SharedArmorSystem : EntitySystem
private FormattedMessage GetArmorExamine(DamageModifierSet armorModifiers)
{
var msg = new FormattedMessage();
msg.AddMarkup(Loc.GetString("armor-examine"));
msg.AddMarkupOrThrow(Loc.GetString("armor-examine"));
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",
msg.AddMarkupOrThrow(Loc.GetString("armor-coefficient-value",
("type", armorType),
("value", MathF.Round((1f - coefficientArmor.Value) * 100, 1))
));
@@ -72,7 +71,7 @@ public abstract class SharedArmorSystem : EntitySystem
msg.PushNewline();
var armorType = Loc.GetString("armor-damage-type-" + flatArmor.Key.ToLower());
msg.AddMarkup(Loc.GetString("armor-reduction-value",
msg.AddMarkupOrThrow(Loc.GetString("armor-reduction-value",
("type", armorType),
("value", flatArmor.Value)
));