Files
OldThink/Content.Server/_White/Commands/SetRandomMapCommand.cs

24 lines
853 B
C#
Raw Normal View History

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;
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("Включена ротация карт.");
}
}