mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-19 07:01:09 +03:00
30 lines
887 B
C#
30 lines
887 B
C#
using Content.Server.Administration;
|
|
using Content.Shared.Administration;
|
|
using Content.Shared.Roles;
|
|
using Robust.Shared.Console;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Server.Roles
|
|
{
|
|
[AdminCommand(AdminFlags.Admin)]
|
|
public sealed partial class ListRolesCommand : LocalizedCommands
|
|
{
|
|
[Dependency] private IPrototypeManager _prototypeManager = default!;
|
|
|
|
public override string Command => "listroles";
|
|
|
|
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
|
{
|
|
if (args.Length != 0)
|
|
{
|
|
shell.WriteLine(Loc.GetString($"shell-need-exactly-zero-arguments"));
|
|
return;
|
|
}
|
|
|
|
foreach(var job in _prototypeManager.EnumeratePrototypes<JobPrototype>())
|
|
{
|
|
shell.WriteLine(job.ID);
|
|
}
|
|
}
|
|
}
|
|
}
|