OOC Patron Color Toggle (#26653)

* Adds the option for you to toggle your OOC Patron color visibility to yourself and others.

* Makes the button magically disappear if you arent a patron
This commit is contained in:
Aexxie
2024-04-04 02:20:06 -05:00
committed by GitHub
parent d8af6a0d14
commit 7ced9d42f0
5 changed files with 18 additions and 3 deletions

View File

@@ -244,8 +244,7 @@ namespace Content.Server.Chat.Managers
var prefs = _preferencesManager.GetPreferences(player.UserId);
colorOverride = prefs.AdminOOCColor;
}
if (player.Channel.UserData.PatronTier is { } patron &&
PatronOocColors.TryGetValue(patron, out var patronColor))
if ( _netConfigManager.GetClientCVar(player.Channel, CCVars.ShowOocPatronColor) && player.Channel.UserData.PatronTier is { } patron && PatronOocColors.TryGetValue(patron, out var patronColor))
{
wrappedMessage = Loc.GetString("chat-manager-send-ooc-patron-wrap-message", ("patronColor", patronColor),("playerName", player.Name), ("message", FormattedMessage.EscapeText(message)));
}