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

@@ -320,8 +320,7 @@ public sealed partial class BlockingSystem : EntitySystem
var modifier = component.IsBlocking ? component.ActiveBlockDamageModifier : component.PassiveBlockDamageModifer;
var msg = new FormattedMessage();
msg.AddMarkup(Loc.GetString("blocking-fraction", ("value", MathF.Round(fraction * 100, 1))));
msg.AddMarkupOrThrow(Loc.GetString("blocking-fraction", ("value", MathF.Round(fraction * 100, 1))));
AppendCoefficients(modifier, msg);
@@ -337,7 +336,7 @@ public sealed partial class BlockingSystem : EntitySystem
foreach (var coefficient in modifiers.Coefficients)
{
msg.PushNewline();
msg.AddMarkup(Robust.Shared.Localization.Loc.GetString("blocking-coefficient-value",
msg.AddMarkupOrThrow(Robust.Shared.Localization.Loc.GetString("blocking-coefficient-value",
("type", coefficient.Key),
("value", MathF.Round(coefficient.Value * 100, 1))
));
@@ -346,7 +345,7 @@ public sealed partial class BlockingSystem : EntitySystem
foreach (var flat in modifiers.FlatReduction)
{
msg.PushNewline();
msg.AddMarkup(Robust.Shared.Localization.Loc.GetString("blocking-reduction-value",
msg.AddMarkupOrThrow(Robust.Shared.Localization.Loc.GetString("blocking-reduction-value",
("type", flat.Key),
("value", flat.Value)
));