]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Killed a resolve in ClientAdminManager (#39863)
authorKyle Tyo <36606155+VerinSenpai@users.noreply.github.com>
Sat, 23 Aug 2025 22:49:44 +0000 (18:49 -0400)
committerGitHub <noreply@github.com>
Sat, 23 Aug 2025 22:49:44 +0000 (00:49 +0200)
took a resolve out back and shot it

Content.Client/Administration/Managers/ClientAdminManager.cs

index 0f740c810459a80f58e56ec04c8dac1d998b88ce..3f072691de62f69e3fba4942278fa7a3e368c1ec 100644 (file)
@@ -15,6 +15,7 @@ namespace Content.Client.Administration.Managers
         [Dependency] private readonly IPlayerManager _player = default!;
         [Dependency] private readonly IClientNetManager _netMgr = default!;
         [Dependency] private readonly IClientConGroupController _conGroup = default!;
+        [Dependency] private readonly IClientConsoleHost _host = default!;
         [Dependency] private readonly IResourceManager _res = default!;
         [Dependency] private readonly ILogManager _logManager = default!;
         [Dependency] private readonly IUserInterfaceManager _userInterface = default!;
@@ -86,12 +87,12 @@ namespace Content.Client.Administration.Managers
         private void UpdateMessageRx(MsgUpdateAdminStatus message)
         {
             _availableCommands.Clear();
-            var host = IoCManager.Resolve<IClientConsoleHost>();
 
             // Anything marked as Any we'll just add even if the server doesn't know about it.
-            foreach (var (command, instance) in host.AvailableCommands)
+            foreach (var (command, instance) in _host.AvailableCommands)
             {
-                if (Attribute.GetCustomAttribute(instance.GetType(), typeof(AnyCommandAttribute)) == null) continue;
+                if (Attribute.GetCustomAttribute(instance.GetType(), typeof(AnyCommandAttribute)) == null)
+                    continue;
                 _availableCommands.Add(command);
             }