Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ChatSystem.cs #42

Merged
merged 1 commit into from
Feb 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions Content.Server/Chat/Systems/ChatSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -406,10 +406,9 @@ private void SendEntitySpeak(
}

name = FormattedMessage.EscapeText(name);
// Corvax-SpeakerColor-Start
if (TryComp<HumanoidAppearanceComponent>(source, out var comp))
name = $"[color={comp.SpeakerColor.ToHex()}]{name}[/color]";
// Corvax-SpeakerColor-End
// TroopStation-char-color
name = $"[color=#acb5af]{name}[/color]";

var speech = GetSpeechVerb(source, message);
var wrappedMessage = Loc.GetString(speech.Bold ? "chat-manager-entity-say-bold-wrap-message" : "chat-manager-entity-say-wrap-message",
("entityName", name),
Expand Down Expand Up @@ -480,10 +479,8 @@ private void SendEntityWhisper(
name = nameEv.Name;
}
name = FormattedMessage.EscapeText(name);
// Corvax-SpeakerColor-Start
if (TryComp<HumanoidAppearanceComponent>(source, out var comp))
name = $"[color={comp.SpeakerColor.ToHex()}]{name}[/color]";
// Corvax-SpeakerColor-End
// TroopStation-char-color
name = $"[color=#acb5af]{name}[/color]";

var wrappedMessage = Loc.GetString("chat-manager-entity-whisper-wrap-message",
("entityName", name), ("message", FormattedMessage.EscapeText(message)));
Expand Down
Loading