Skip to content

Commit

Permalink
add color ahelp
Browse files Browse the repository at this point in the history
  • Loading branch information
CrimeMoot authored Jan 2, 2025
1 parent ccb2f6a commit c7cc90a
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion Content.Server/Administration/Systems/BwoinkSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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);

Check failure on line 677 in Content.Server/Administration/Systems/BwoinkSystem.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

The name '_preferencesManager' does not exist in the current context

Check failure on line 677 in Content.Server/Administration/Systems/BwoinkSystem.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

The name '_preferencesManager' does not exist in the current context

Check failure on line 677 in Content.Server/Administration/Systems/BwoinkSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The name '_preferencesManager' does not exist in the current context

Check failure on line 677 in Content.Server/Administration/Systems/BwoinkSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The name '_preferencesManager' does not exist in the current context

Check failure on line 677 in Content.Server/Administration/Systems/BwoinkSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The name '_preferencesManager' does not exist in the current context

Check failure on line 677 in Content.Server/Administration/Systems/BwoinkSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The name '_preferencesManager' does not exist in the current context

Check failure on line 677 in Content.Server/Administration/Systems/BwoinkSystem.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

The name '_preferencesManager' does not exist in the current context

Check failure on line 677 in Content.Server/Administration/Systems/BwoinkSystem.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

The name '_preferencesManager' does not exist in the current context
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
{
Expand Down

0 comments on commit c7cc90a

Please sign in to comment.