2021-02-01 16:49:43 -08:00
|
|
|
using Content.Server.Administration;
|
2021-12-13 16:45:49 +11:00
|
|
|
using Content.Shared.Administration;
|
2021-02-11 01:13:03 -08:00
|
|
|
using Robust.Server.Player;
|
2021-02-01 16:49:43 -08:00
|
|
|
using Robust.Shared.Console;
|
2021-06-20 10:09:24 +02:00
|
|
|
using Robust.Shared.GameObjects;
|
2020-12-03 03:40:47 +01:00
|
|
|
using Robust.Shared.IoC;
|
|
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Server.GameTicking.Commands
|
2020-12-03 03:40:47 +01:00
|
|
|
{
|
|
|
|
|
[AnyCommand]
|
2022-02-16 00:23:23 -07:00
|
|
|
sealed class ToggleReadyCommand : IConsoleCommand
|
2020-12-03 03:40:47 +01:00
|
|
|
{
|
|
|
|
|
public string Command => "toggleready";
|
|
|
|
|
public string Description => "";
|
|
|
|
|
public string Help => "";
|
|
|
|
|
|
2021-02-01 16:49:43 -08:00
|
|
|
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
2020-12-03 03:40:47 +01:00
|
|
|
{
|
2021-02-01 16:49:43 -08:00
|
|
|
var player = shell.Player as IPlayerSession;
|
2020-12-03 03:40:47 +01:00
|
|
|
if (player == null)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2021-06-20 10:09:24 +02:00
|
|
|
var ticker = EntitySystem.Get<GameTicker>();
|
2020-12-03 03:40:47 +01:00
|
|
|
ticker.ToggleReady(player, bool.Parse(args[0]));
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-02-01 16:49:43 -08:00
|
|
|
}
|