1
0

DelayShuttleRoundEndCommand.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. using Content.Server.Administration;
  2. using Content.Server.Shuttles.Systems;
  3. using Content.Shared.Administration;
  4. using Robust.Shared.Console;
  5. namespace Content.Server.Shuttles.Commands;
  6. /// <summary>
  7. /// Delays the round from ending via the shuttle call. Can still be ended via other means.
  8. /// </summary>
  9. [AdminCommand(AdminFlags.Fun)]
  10. public sealed class DelayRoundEndCommand : IConsoleCommand
  11. {
  12. [Dependency] private readonly IEntitySystemManager _sysManager = default!;
  13. public string Command => "delayroundend";
  14. public string Description => Loc.GetString("emergency-shuttle-command-round-desc");
  15. public string Help => $"{Command}";
  16. public void Execute(IConsoleShell shell, string argStr, string[] args)
  17. {
  18. var system = _sysManager.GetEntitySystem<EmergencyShuttleSystem>();
  19. if (system.DelayEmergencyRoundEnd())
  20. {
  21. shell.WriteLine(Loc.GetString("emergency-shuttle-command-round-yes"));
  22. }
  23. else
  24. {
  25. shell.WriteLine(Loc.GetString("emergency-shuttle-command-round-no"));
  26. }
  27. }
  28. }