]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Cleanup duplicate dependency in `AddActionCommand` (#38360)
authorTayrtahn <tayrtahn@gmail.com>
Mon, 16 Jun 2025 19:02:35 +0000 (15:02 -0400)
committerGitHub <noreply@github.com>
Mon, 16 Jun 2025 19:02:35 +0000 (21:02 +0200)
Cleanup duplicate dependency in AddActionCommand

Content.Server/Actions/Commands/AddActionCommand.cs

index c2c471e0ea03db2e38f2eb0dc12ca68ccbbb93c7..5b80c92aa915f3ce7285af19e9ba16bbe13bbf99 100644 (file)
@@ -12,7 +12,6 @@ namespace Content.Server.Actions.Commands;
 [AdminCommand(AdminFlags.Debug)]
 public sealed class AddActionCommand : LocalizedEntityCommands
 {
-    [Dependency] private readonly IPrototypeManager _prototypes = default!;
     [Dependency] private readonly SharedActionsSystem _actions = default!;
     [Dependency] private readonly IPrototypeManager _prototypeManager = default!;
 
@@ -38,7 +37,7 @@ public sealed class AddActionCommand : LocalizedEntityCommands
             return;
         }
 
-        if (!_prototypes.TryIndex<EntityPrototype>(args[1], out var proto) ||
+        if (!_prototypeManager.TryIndex<EntityPrototype>(args[1], out var proto) ||
             !proto.HasComponent<ActionComponent>())
         {
             shell.WriteError(Loc.GetString("cmd-addaction-action-not-found", ("action", args[1])));