| 1234567891011121314151617181920212223242526272829303132 |
- using Content.Shared.Administration;
- using Robust.Shared.Console;
- namespace Content.Server.GameTicking.Commands
- {
- [AnyCommand]
- sealed class ToggleReadyCommand : IConsoleCommand
- {
- [Dependency] private readonly IEntityManager _e = default!;
- public string Command => "toggleready";
- public string Description => "";
- public string Help => "";
- public void Execute(IConsoleShell shell, string argStr, string[] args)
- {
- var player = shell.Player;
- if (args.Length != 1)
- {
- shell.WriteError(Loc.GetString("shell-wrong-arguments-number"));
- return;
- }
- if (player == null)
- {
- return;
- }
- var ticker = _e.System<GameTicker>();
- ticker.ToggleReady(player, bool.Parse(args[0]));
- }
- }
- }
|