diff --git a/Content.Server/White/Commands/SetRandomMapCommand.cs b/Content.Server/White/Commands/SetRandomMapCommand.cs new file mode 100644 index 0000000000..b7463b64ac --- /dev/null +++ b/Content.Server/White/Commands/SetRandomMapCommand.cs @@ -0,0 +1,23 @@ +using Content.Server.Administration; +using Content.Shared.Administration; +using Content.Shared.CCVar; +using Robust.Shared.Configuration; +using Robust.Shared.Console; + +namespace Content.Server.White.Commands; + +[AdminCommand(AdminFlags.Round)] +sealed class SetRanomMapCommand : IConsoleCommand +{ + [Dependency] private readonly IConfigurationManager _configurationManager = default!; + + public string Command => "setrandommap"; + public string Description => "Устанавливает случайную карту из пула и включает ротацию карт"; + public string Help => "setrandommap"; + + public void Execute(IConsoleShell shell, string argStr, string[] args) + { + _configurationManager.SetCVar(CCVars.GameMap, string.Empty); + shell.WriteLine("Включена ротация карт."); + } +}