From c7cc90a865d9ee2b83c2cd86259fd1b2377b2522 Mon Sep 17 00:00:00 2001 From: CrimeMoot Date: Thu, 2 Jan 2025 08:27:37 +0500 Subject: [PATCH] add color ahelp --- .../Administration/Systems/BwoinkSystem.cs | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Content.Server/Administration/Systems/BwoinkSystem.cs b/Content.Server/Administration/Systems/BwoinkSystem.cs index 77f5d0ee148..6134c952213 100644 --- a/Content.Server/Administration/Systems/BwoinkSystem.cs +++ b/Content.Server/Administration/Systems/BwoinkSystem.cs @@ -26,6 +26,7 @@ using Robust.Shared.Player; using Robust.Shared.Timing; using Robust.Shared.Utility; +using Content.Server.Preferences.Managers; // Cats edit namespace Content.Server.Administration.Systems { @@ -671,7 +672,24 @@ protected override void OnBwoinkTextMessage(BwoinkTextMessage message, EntitySes } else if (senderAdmin is not null && senderAdmin.HasFlag(AdminFlags.Adminhelp)) { - bwoinkText = $"[color=red]{adminPrefix}{senderSession.Name}[/color]"; + // Cats edit-Start: Now the colors set by setadminooc will also color the nickname with the prefix in f1. + Color? colorOverride = null; + var prefs = _preferencesManager.GetPreferences(senderSession.UserId); + colorOverride = prefs.AdminOOCColor; + if (colorOverride.HasValue) + { + var colorString = $"#" + + $"{(int)(colorOverride.Value.R * 255):X2}" + + $"{(int)(colorOverride.Value.G * 255):X2}" + + $"{(int)(colorOverride.Value.B * 255):X2}" + + $"{(int)(colorOverride.Value.A * 255):X2}"; + bwoinkText = $"[color={colorString}]{adminPrefix}{senderSession.Name}[/color]"; + } + else + { + bwoinkText = $"[color=red]{adminPrefix}{senderSession.Name}[/color]"; + } + // Cats-edit-End } else {