]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix color tags in admin logs (#24606)
authorTayrtahn <tayrtahn@gmail.com>
Sat, 27 Jan 2024 02:31:54 +0000 (21:31 -0500)
committerGitHub <noreply@github.com>
Sat, 27 Jan 2024 02:31:54 +0000 (21:31 -0500)
Content.Server/Chat/Systems/ChatSystem.cs

index 1b5c8b83fa461bd489eaf52d9e389f34b6ca5648..650a8b29479f5afdb3604d2dd14e052deeb8cc7a 100644 (file)
@@ -425,11 +425,12 @@ public sealed partial class ChatSystem : SharedChatSystem
         name = FormattedMessage.EscapeText(name);
 
         // color the name unless it's something like "the old man"
+        string coloredName = name;
         if (!TryComp<GrammarComponent>(source, out var grammar) || grammar.ProperNoun == true)
-            name = $"[color={GetNameColor(name)}]{name}[/color]";
+            coloredName = $"[color={GetNameColor(name)}]{name}[/color]";
 
         var wrappedMessage = Loc.GetString(speech.Bold ? "chat-manager-entity-say-bold-wrap-message" : "chat-manager-entity-say-wrap-message",
-            ("entityName", name),
+            ("entityName", coloredName),
             ("verb", Loc.GetString(_random.Pick(speech.SpeechVerbStrings))),
             ("fontType", speech.FontId),
             ("fontSize", speech.FontSize),