diff --git a/Content.Client/Chat/UI/SpeechBubble.cs b/Content.Client/Chat/UI/SpeechBubble.cs index 48b1c9dc42..ac6516c2b2 100644 --- a/Content.Client/Chat/UI/SpeechBubble.cs +++ b/Content.Client/Chat/UI/SpeechBubble.cs @@ -2,6 +2,7 @@ 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; @@ -15,8 +16,8 @@ namespace Content.Client.Chat.UI { [Dependency] private readonly IEyeManager _eyeManager = default!; [Dependency] private readonly IEntityManager _entityManager = default!; - [Dependency] private readonly SharedTransformSystem _xformSystem = 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 542d795235..83a0dc3a35 100644 --- a/Content.Client/UserInterface/Systems/Chat/ChatUIController.cs +++ b/Content.Client/UserInterface/Systems/Chat/ChatUIController.cs @@ -46,7 +46,6 @@ 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,13 +53,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 SharedTransformSystem? _xformSystem = default!; + [UISystemDependency] private readonly TransformSystem? _xformSystem = default!; [ValidatePrototypeId] private const string ChatNamePalette = "ChatNames"; @@ -180,8 +178,8 @@ public sealed class ChatUIController : UIController _net.RegisterNetMessage(OnChatMessage); _net.RegisterNetMessage(OnDeleteChatMessagesBy); SubscribeNetworkEvent(OnDamageForceSay); - _cfg.OnValueChanged(CCVars.ChatEnableColorName, (value) => { _chatNameColorsEnabled = value; }); - _chatNameColorsEnabled = _cfg.GetCVar(CCVars.ChatEnableColorName); + _config.OnValueChanged(CCVars.ChatEnableColorName, (value) => { _chatNameColorsEnabled = value; }); + _chatNameColorsEnabled = _config.GetCVar(CCVars.ChatEnableColorName); _speechBubbleRoot = new LayoutContainer(); @@ -771,7 +769,7 @@ public sealed class ChatUIController : UIController ProcessChatMessage(msg); if ((msg.Channel & ChatChannel.AdminRelated) == 0 || - _cfg.GetCVar(CCVars.ReplayRecordAdminChat)) + _config.GetCVar(CCVars.ReplayRecordAdminChat)) { _replayRecording.RecordClientMessage(msg); } @@ -782,7 +780,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 = _ent.GetComponentOrNull(_ent.GetEntity(msg.SenderEntity)); + var grammar = EntityManager.GetComponentOrNull(EntityManager.GetEntity(msg.SenderEntity)); if (grammar != null && grammar.ProperNoun == true) msg.WrappedMessage = SharedChatSystem.InjectTagInsideTag(msg, "Name", "color", GetNameColor(SharedChatSystem.GetStringInsideTag(msg, "Name"))); } @@ -831,7 +829,7 @@ public sealed class ChatUIController : UIController break; case ChatChannel.LOOC: - if (_cfg.GetCVar(CCVars.LoocAboveHeadShow)) + if (_config.GetCVar(CCVars.LoocAboveHeadShow)) AddSpeechBubble(msg, SpeechBubble.SpeechType.Looc); break; }