Cleanup duplicate dependency in `AddActionCommand` (#38360)

Cleanup duplicate dependency in AddActionCommand
This commit is contained in:
Tayrtahn 2025-06-16 15:02:35 -04:00 committed by Quanteey
parent 8f0b0b266b
commit 1181854f82
1 changed files with 1 additions and 2 deletions

View File

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