diff --git a/Content.Client/Chat/UI/SpeechBubble.cs b/Content.Client/Chat/UI/SpeechBubble.cs index 69e0882cc3..82eccbcec8 100644 --- a/Content.Client/Chat/UI/SpeechBubble.cs +++ b/Content.Client/Chat/UI/SpeechBubble.cs @@ -2,7 +2,6 @@ using System.Numerics; using Content.Client.Chat.Managers; using Content.Shared.CCVar; using Content.Shared.Chat; -using Robust.Client.GameObjects; using Robust.Client.Graphics; using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; @@ -17,7 +16,6 @@ namespace Content.Client.Chat.UI [Dependency] private readonly IEyeManager _eyeManager = default!; [Dependency] private readonly IEntityManager _entityManager = default!; [Dependency] protected readonly IConfigurationManager ConfigManager = default!; - private readonly SharedTransformSystem _xformSystem; public enum SpeechType : byte { diff --git a/Content.Client/UserInterface/Systems/Chat/ChatUIController.cs b/Content.Client/UserInterface/Systems/Chat/ChatUIController.cs index b380ea7262..ff4972d9d0 100644 --- a/Content.Client/UserInterface/Systems/Chat/ChatUIController.cs +++ b/Content.Client/UserInterface/Systems/Chat/ChatUIController.cs @@ -47,6 +47,7 @@ public sealed class ChatUIController : UIController [Dependency] private readonly IChatManager _manager = default!; [Dependency] private readonly IConfigurationManager _config = default!; [Dependency] private readonly IEyeManager _eye = default!; + [Dependency] private readonly IEntityManager _ent = default!; [Dependency] private readonly IInputManager _input = default!; [Dependency] private readonly IClientNetManager _net = default!; [Dependency] private readonly IPlayerManager _player = default!; @@ -54,12 +55,12 @@ public sealed class ChatUIController : UIController [Dependency] private readonly IStateManager _state = default!; [Dependency] private readonly IGameTiming _timing = default!; [Dependency] private readonly IReplayRecordingManager _replayRecording = default!; + [Dependency] private readonly IConfigurationManager _cfg = default!; [UISystemDependency] private readonly ExamineSystem? _examine = default; [UISystemDependency] private readonly GhostSystem? _ghost = default; [UISystemDependency] private readonly TypingIndicatorSystem? _typingIndicator = default; [UISystemDependency] private readonly ChatSystem? _chatSys = default; - [UISystemDependency] private readonly TransformSystem? _xformSystem = default!; [UISystemDependency] private readonly PsionicChatUpdateSystem? _psionic = default!; //Nyano - Summary: makes the psionic chat available. [ValidatePrototypeId] @@ -183,8 +184,8 @@ public sealed class ChatUIController : UIController _net.RegisterNetMessage(OnChatMessage); _net.RegisterNetMessage(OnDeleteChatMessagesBy); SubscribeNetworkEvent(OnDamageForceSay); - _config.OnValueChanged(CCVars.ChatEnableColorName, (value) => { _chatNameColorsEnabled = value; }); - _chatNameColorsEnabled = _config.GetCVar(CCVars.ChatEnableColorName); + _cfg.OnValueChanged(CCVars.ChatEnableColorName, (value) => { _chatNameColorsEnabled = value; }); + _chatNameColorsEnabled = _cfg.GetCVar(CCVars.ChatEnableColorName); _speechBubbleRoot = new LayoutContainer(); @@ -783,7 +784,7 @@ public sealed class ChatUIController : UIController ProcessChatMessage(msg); if ((msg.Channel & ChatChannel.AdminRelated) == 0 || - _config.GetCVar(CCVars.ReplayRecordAdminChat)) + _cfg.GetCVar(CCVars.ReplayRecordAdminChat)) { _replayRecording.RecordClientMessage(msg); } @@ -794,7 +795,7 @@ public sealed class ChatUIController : UIController // color the name unless it's something like "the old man" if ((msg.Channel == ChatChannel.Local || msg.Channel == ChatChannel.Whisper) && _chatNameColorsEnabled) { - var grammar = EntityManager.GetComponentOrNull(EntityManager.GetEntity(msg.SenderEntity)); + var grammar = _ent.GetComponentOrNull(_ent.GetEntity(msg.SenderEntity)); if (grammar != null && grammar.ProperNoun == true) msg.WrappedMessage = SharedChatSystem.InjectTagInsideTag(msg, "Name", "color", GetNameColor(SharedChatSystem.GetStringInsideTag(msg, "Name"))); } @@ -843,7 +844,7 @@ public sealed class ChatUIController : UIController break; case ChatChannel.LOOC: - if (_config.GetCVar(CCVars.LoocAboveHeadShow)) + if (_cfg.GetCVar(CCVars.LoocAboveHeadShow)) AddSpeechBubble(msg, SpeechBubble.SpeechType.Looc); break; }