From: Pieter-Jan Briers Date: Wed, 24 Dec 2025 01:56:31 +0000 (+0100) Subject: Fix NanoTask and bounty print formatting (#42030) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=9511285508133839a11c5f6a14ab7cf61b558060;p=space-station-14.git Fix NanoTask and bounty print formatting (#42030) Markup text was erroneously being appended via AddText(). --- diff --git a/Content.Server/Cargo/Systems/CargoSystem.Bounty.cs b/Content.Server/Cargo/Systems/CargoSystem.Bounty.cs index c2c2a8365c..72941a1665 100644 --- a/Content.Server/Cargo/Systems/CargoSystem.Bounty.cs +++ b/Content.Server/Cargo/Systems/CargoSystem.Bounty.cs @@ -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) { diff --git a/Content.Server/CartridgeLoader/Cartridges/NanoTaskCartridgeSystem.cs b/Content.Server/CartridgeLoader/Cartridges/NanoTaskCartridgeSystem.cs index 66934c8a87..a544ba66e0 100644 --- a/Content.Server/CartridgeLoader/Cartridges/NanoTaskCartridgeSystem.cs +++ b/Content.Server/CartridgeLoader/Cartridges/NanoTaskCartridgeSystem.cs @@ -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"),