]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix NanoTask and bounty print formatting (#42030)
authorPieter-Jan Briers <pieterjan.briers+git@gmail.com>
Wed, 24 Dec 2025 01:56:31 +0000 (02:56 +0100)
committerGitHub <noreply@github.com>
Wed, 24 Dec 2025 01:56:31 +0000 (01:56 +0000)
Markup text was erroneously being appended via AddText().

Content.Server/Cargo/Systems/CargoSystem.Bounty.cs
Content.Server/CartridgeLoader/Cartridges/NanoTaskCartridgeSystem.cs

index c2c2a8365cf316a0f55799f676ca1a241a830941..72941a16650c22da8e4079986c149cb4761b07be 100644 (file)
@@ -119,9 +119,9 @@ public sealed partial class CargoSystem
         label.Id = bounty.Id;
         label.AssociatedStationId = stationId;
         var msg = new FormattedMessage();
-        msg.AddText(Loc.GetString("bounty-manifest-header", ("id", bounty.Id)));
+        msg.AddMarkupOrThrow(Loc.GetString("bounty-manifest-header", ("id", bounty.Id)));
         msg.PushNewline();
-        msg.AddText(Loc.GetString("bounty-manifest-list-start"));
+        msg.AddMarkupOrThrow(Loc.GetString("bounty-manifest-list-start"));
         msg.PushNewline();
         foreach (var entry in prototype.Entries)
         {
index 66934c8a8714aeb9e5841188f0069d6327bf8e6a..a544ba66e0f42c2d0d4f51f2a5d077f483584ae1 100644 (file)
@@ -77,11 +77,11 @@ public sealed class NanoTaskCartridgeSystem : SharedNanoTaskCartridgeSystem
 
         printed.Task = item;
         var msg = new FormattedMessage();
-        msg.AddText(Loc.GetString("nano-task-printed-description", ("description", item.Description)));
+        msg.AddMarkupOrThrow(Loc.GetString("nano-task-printed-description", ("description", FormattedMessage.EscapeText(item.Description))));
         msg.PushNewline();
-        msg.AddText(Loc.GetString("nano-task-printed-requester", ("requester", item.TaskIsFor)));
+        msg.AddMarkupOrThrow(Loc.GetString("nano-task-printed-requester", ("requester", FormattedMessage.EscapeText(item.TaskIsFor))));
         msg.PushNewline();
-        msg.AddText(item.Priority switch {
+        msg.AddMarkupOrThrow(item.Priority switch {
             NanoTaskPriority.High => Loc.GetString("nano-task-printed-high-priority"),
             NanoTaskPriority.Medium => Loc.GetString("nano-task-printed-medium-priority"),
             NanoTaskPriority.Low => Loc.GetString("nano-task-printed-low-priority"),