2023-09-11 23:21:14 +09:00
|
|
|
using Content.Server.Administration;
|
|
|
|
|
using Content.Shared.Administration;
|
|
|
|
|
using Content.Shared.CCVar;
|
|
|
|
|
using Robust.Shared.Configuration;
|
|
|
|
|
using Robust.Shared.Console;
|
|
|
|
|
|
2024-01-28 18:18:54 +07:00
|
|
|
namespace Content.Server._White.Commands;
|
2023-09-11 23:21:14 +09:00
|
|
|
|
|
|
|
|
[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("Включена ротация карт.");
|
|
|
|
|
}
|
|
|
|
|
}
|