Command resolve killing and LEC conversions batch 2 (#38367)

commit progress
This commit is contained in:
Kyle Tyo
2025-06-17 14:01:28 -04:00
committed by GitHub
parent 57babe15ee
commit 0e1ff2644f
18 changed files with 130 additions and 126 deletions

View File

@@ -7,24 +7,21 @@ using Robust.Shared.Prototypes;
namespace Content.Server.Roles
{
[AdminCommand(AdminFlags.Admin)]
public sealed class ListRolesCommand : IConsoleCommand
public sealed class ListRolesCommand : LocalizedCommands
{
public string Command => "listroles";
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
public string Description => "Lists roles";
public override string Command => "listroles";
public string Help => "listroles";
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (args.Length != 0)
{
shell.WriteLine("Expected no arguments.");
shell.WriteLine(Loc.GetString($"shell-need-exactly-zero-arguments"));
return;
}
var prototypeManager = IoCManager.Resolve<IPrototypeManager>();
foreach(var job in prototypeManager.EnumeratePrototypes<JobPrototype>())
foreach(var job in _prototypeManager.EnumeratePrototypes<JobPrototype>())
{
shell.WriteLine(job.ID);
}