From: Tayrtahn Date: Mon, 16 Jun 2025 19:02:35 +0000 (-0400) Subject: Cleanup duplicate dependency in `AddActionCommand` (#38360) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=4cca55cecc28a85b60059f28bcecfe2964b4371c;p=space-station-14.git Cleanup duplicate dependency in `AddActionCommand` (#38360) Cleanup duplicate dependency in AddActionCommand --- diff --git a/Content.Server/Actions/Commands/AddActionCommand.cs b/Content.Server/Actions/Commands/AddActionCommand.cs index c2c471e0ea..5b80c92aa9 100644 --- a/Content.Server/Actions/Commands/AddActionCommand.cs +++ b/Content.Server/Actions/Commands/AddActionCommand.cs @@ -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(args[1], out var proto) || + if (!_prototypeManager.TryIndex(args[1], out var proto) || !proto.HasComponent()) { shell.WriteError(Loc.GetString("cmd-addaction-action-not-found", ("action", args[1])));