Merge branch 'master' into ed-25-08-2025-upstream-sync

This commit is contained in:
Ed
2025-09-08 11:31:28 +03:00
177 changed files with 2400 additions and 896 deletions

View File

@@ -1,6 +1,7 @@
using System.Globalization;
using System.Linq;
using System.Numerics;
using Content.Client._CP14.IdentityRecognition;
using Content.Client.Administration.Managers;
using Content.Client.Chat;
using Content.Client.Chat.Managers;
@@ -820,6 +821,21 @@ public sealed partial class ChatUIController : UIController
public void ProcessChatMessage(ChatMessage msg, bool speechBubble = true)
{
//CP14 transform message on clientside
if (_player.LocalEntity is not null && msg.SenderEntity.IsValid())
{
var ev = new CP14ClientTransformNameEvent(msg.SenderEntity);
_ent.EventBus.RaiseLocalEvent(_player.LocalEntity.Value, ev);
if (ev.Handled)
{
var oldName = SharedChatSystem.GetStringInsideTag(msg, "Name");
var newName = ev.Name;
msg.WrappedMessage = msg.WrappedMessage.Replace($"[Name]{oldName}[/Name]", $"[Name]{newName}[/Name]");
}
}
//CP14 end
// color the name unless it's something like "the old man"
if ((msg.Channel == ChatChannel.Local || msg.Channel == ChatChannel.Whisper) && _chatNameColorsEnabled)
{