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 GitHub
parent 3cbb7c122e
commit 4cca55cecc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View 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])));