Skip to content

Commit 26f9903

Browse files
committed
Revert "Add colored chat names (#844)"
This reverts commit b667098.
1 parent 02396d7 commit 26f9903

File tree

4 files changed

+1
-57
lines changed

4 files changed

+1
-57
lines changed

Content.Server/Chat/Systems/ChatSystem.cs

+1-10
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
using Content.Shared.CCVar;
1414
using Content.Shared.Chat;
1515
using Content.Shared.Database;
16-
using Content.Shared.Humanoid;
1716
using Content.Shared.Ghost;
1817
using Content.Shared.IdentityManagement;
1918
using Content.Shared.Interaction;
@@ -420,11 +419,6 @@ private void SendEntitySpeak(
420419
}
421420

422421
name = FormattedMessage.EscapeText(name);
423-
// Corvax-SpeakerColor-Start
424-
if (TryComp<HumanoidAppearanceComponent>(source, out var comp))
425-
name = $"[color={comp.SpeakerColor.ToHex()}]{name}[/color]";
426-
// Corvax-SpeakerColor-End
427-
428422
var wrappedMessage = Loc.GetString(speech.Bold ? "chat-manager-entity-say-bold-wrap-message" : "chat-manager-entity-say-wrap-message",
429423
("entityName", name),
430424
("verb", Loc.GetString(_random.Pick(speech.SpeechVerbStrings))),
@@ -494,10 +488,7 @@ private void SendEntityWhisper(
494488
name = nameEv.Name;
495489
}
496490
name = FormattedMessage.EscapeText(name);
497-
// Corvax-SpeakerColor-Start
498-
if (TryComp<HumanoidAppearanceComponent>(source, out var comp))
499-
name = $"[color={comp.SpeakerColor.ToHex()}]{name}[/color]";
500-
// Corvax-SpeakerColor-End
491+
501492

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

Content.Shared/Humanoid/HumanoidAppearanceComponent.cs

-5
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,6 @@ public sealed partial class HumanoidAppearanceComponent : Component
8080
[DataField, AutoNetworkedField]
8181
public Color EyeColor = Color.Brown;
8282

83-
// Corvax-ChatColor-Start
84-
[DataField, AutoNetworkedField]
85-
public Color SpeakerColor = Color.White;
86-
// Corvax-ChatColor-End
87-
8883
/// <summary>
8984
/// Hair color of this humanoid. Used to avoid looping through all markings
9085
/// </summary>

Content.Shared/Humanoid/SharedHumanoidAppearanceSystem.cs

-7
Original file line numberDiff line numberDiff line change
@@ -340,13 +340,6 @@ public virtual void LoadProfile(EntityUid uid, HumanoidCharacterProfile profile,
340340

341341
humanoid.Age = profile.Age;
342342

343-
// Corvax-SpeakerColor-Start
344-
const string paletteId = "Material";
345-
var colors = _prototypeManager.Index<ColorPalettePrototype>(paletteId).Colors.Values.ToArray();
346-
var colorIdx = Math.Abs(profile.Name.GetHashCode() % colors.Length);
347-
humanoid.SpeakerColor = colors[colorIdx];
348-
// Corvax-SpeakerColor-End
349-
350343
Dirty(humanoid);
351344
}
352345

Resources/Prototypes/Corvax/Palletes/text.yml

-35
This file was deleted.

0 commit comments

Comments
 (0)