diff --git a/Content.Server/Roles/ListRolesCommand.cs b/Content.Server/Roles/ListRolesCommand.cs new file mode 100644 index 0000000000..cc05849b8d --- /dev/null +++ b/Content.Server/Roles/ListRolesCommand.cs @@ -0,0 +1,34 @@ +using Content.Server.Administration; +using Content.Shared.Administration; +using Content.Shared.Roles; +using Robust.Shared.Console; +using Robust.Shared.IoC; +using Robust.Shared.Prototypes; + +namespace Content.Server.Roles +{ + [AdminCommand(AdminFlags.Fun)] + public class ListRolesCommand : IConsoleCommand + { + public string Command => "listroles"; + + public string Description => "Lists roles"; + + public string Help => "listroles"; + + public void Execute(IConsoleShell shell, string argStr, string[] args) + { + if (args.Length != 0) + { + shell.WriteLine("Expected no arguments."); + return; + } + + var prototypeManager = IoCManager.Resolve(); + foreach(var job in prototypeManager.EnumeratePrototypes()) + { + shell.WriteLine(job.ID); + } + } + } +}