ThrowScoreboardCommand.cs 787 B

123456789101112131415161718192021222324252627
  1. using Content.Server.GameTicking;
  2. using Content.Shared.Administration;
  3. using Robust.Shared.Console;
  4. namespace Content.Server.Administration.Commands;
  5. [AdminCommand(AdminFlags.VarEdit)]
  6. public sealed class ThrowScoreboardCommand : IConsoleCommand
  7. {
  8. [Dependency] private readonly IEntityManager _e = default!;
  9. public string Command => "throwscoreboard";
  10. public string Description => Loc.GetString("throw-scoreboard-command-description");
  11. public string Help => Loc.GetString("throw-scoreboard-command-help-text");
  12. public void Execute(IConsoleShell shell, string argStr, string[] args)
  13. {
  14. if (args.Length > 0)
  15. {
  16. shell.WriteLine(Help);
  17. return;
  18. }
  19. _e.System<GameTicker>().ShowRoundEndScoreboard();
  20. }
  21. }