Files
tbd-station-14/Content.Server/GameTicking/Commands/ToggleReadyCommand.cs
2023-10-24 20:19:08 +11:00

31 lines
832 B
C#

using Content.Shared.Administration;
using Robust.Shared.Console;
namespace Content.Server.GameTicking.Commands
{
[AnyCommand]
sealed class ToggleReadyCommand : IConsoleCommand
{
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 = EntitySystem.Get<GameTicker>();
ticker.ToggleReady(player, bool.Parse(args[0]));
}
}
}