Fix color tags in admin logs (#24606)

(cherry picked from commit 149654be88b9e9b988027a8e6ff6f691ba1cfea4)
This commit is contained in:
Tayrtahn 2024-01-26 21:31:54 -05:00 committed by Debug
parent b337cf59c3
commit af42b9ac58
No known key found for this signature in database
GPG Key ID: 271270A74EF9C350
1 changed files with 3 additions and 2 deletions

View File

@ -435,11 +435,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),