Files
tbd-station-14/Content.Server/GameTicking/Commands/StartRoundCommand.cs
2025-09-03 12:49:34 +02:00

25 lines
701 B
C#

using Content.Server.Administration;
using Content.Shared.Administration;
using Robust.Shared.Console;
namespace Content.Server.GameTicking.Commands;
[AdminCommand(AdminFlags.Round)]
public sealed class StartRoundCommand : LocalizedEntityCommands
{
[Dependency] private readonly GameTicker _gameTicker = default!;
public override string Command => "startround";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (_gameTicker.RunLevel != GameRunLevel.PreRoundLobby)
{
shell.WriteLine(Loc.GetString("shell-can-only-run-from-pre-round-lobby"));
return;
}
_gameTicker.StartRound();
}
}