Add setrandommap command (#386)
This commit is contained in:
23
Content.Server/White/Commands/SetRandomMapCommand.cs
Normal file
23
Content.Server/White/Commands/SetRandomMapCommand.cs
Normal file
@@ -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("Включена ротация карт.");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user