Cleanup duplicate dependency in AddActionCommand (#38360)
Cleanup duplicate dependency in AddActionCommand
This commit is contained in:
@@ -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])));
|
||||
|
||||
Reference in New Issue
Block a user