Cleanup duplicate dependency in `AddActionCommand` (#38360)
Cleanup duplicate dependency in AddActionCommand
This commit is contained in:
parent
8f0b0b266b
commit
1181854f82
|
|
@ -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])));
|
||||
|
|
|
|||
Loading…
Reference in New Issue