chat color change (#24922)

This commit is contained in:
Nemanja
2024-02-03 12:33:57 -05:00
committed by GitHub
parent c9018cf205
commit 2d48ec52ab
2 changed files with 20 additions and 3 deletions

View File

@@ -71,7 +71,7 @@ public sealed partial class ChatSystem : SharedChatSystem
private readonly bool _adminLoocEnabled = true; private readonly bool _adminLoocEnabled = true;
[ValidatePrototypeId<ColorPalettePrototype>] [ValidatePrototypeId<ColorPalettePrototype>]
private const string _chatNamePalette = "Material"; private const string ChatNamePalette = "ChatNames";
private string[] _chatNameColors = default!; private string[] _chatNameColors = default!;
public override void Initialize() public override void Initialize()
@@ -84,7 +84,7 @@ public sealed partial class ChatSystem : SharedChatSystem
SubscribeLocalEvent<GameRunLevelChangedEvent>(OnGameChange); SubscribeLocalEvent<GameRunLevelChangedEvent>(OnGameChange);
var nameColors = _prototypeManager.Index<ColorPalettePrototype>(_chatNamePalette).Colors.Values.ToArray(); var nameColors = _prototypeManager.Index<ColorPalettePrototype>(ChatNamePalette).Colors.Values.ToArray();
_chatNameColors = new string[nameColors.Length]; _chatNameColors = new string[nameColors.Length];
for (var i = 0; i < nameColors.Length; i++) for (var i = 0; i < nameColors.Length; i++)
{ {

View File

@@ -33,3 +33,20 @@
amber-darken-2: "#cc8000" amber-darken-2: "#cc8000"
amber-accent-2: "#7c6200" amber-accent-2: "#7c6200"
amber-accent-4: "#996700" amber-accent-4: "#996700"
- type: palette
id: ChatNames
name: Chat Names
colors:
ploink: "#da8bc9"
ourple: "#b18bda"
us-navy: "#96a4eb"
yet-another-blue: "#8cb7e8"
cyan: "#8bc9da"
fake-color: "#8bdaba"
green: "#8bda8e"
you-wish-you-were-green: "#a9da8b"
piss: "#ceda8b"
orange: "#dabc8b"
the-orange-she-tells-you-not-to-worry-about: "#daa58b"
red: "#da8b8b"