forcemap update
This commit is contained in:
@@ -28,11 +28,22 @@ namespace Content.Server.GameTicking.Commands
|
||||
|
||||
var gameMap = IoCManager.Resolve<IGameMapManager>();
|
||||
var name = args[0];
|
||||
// WD EDIT START AHEAD OF WIZDEN
|
||||
// An empty string clears the forced map
|
||||
if (!string.IsNullOrEmpty(name) && !gameMap.CheckMapExists(name))
|
||||
{
|
||||
shell.WriteLine(Loc.GetString("forcemap-command-map-not-found", ("map", name)));
|
||||
return;
|
||||
}
|
||||
|
||||
_configurationManager.SetCVar(CCVars.GameMap, name);
|
||||
shell.WriteLine(Loc.GetString("forcemap-command-success", ("map", name)));
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(name))
|
||||
shell.WriteLine(Loc.GetString("forcemap-command-cleared"));
|
||||
else
|
||||
shell.WriteLine(Loc.GetString("forcemap-command-success", ("map", name)));
|
||||
// WD EDIT END AHEAD OF WIZDEN
|
||||
}
|
||||
public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
{
|
||||
if (args.Length == 1)
|
||||
|
||||
@@ -3,5 +3,7 @@
|
||||
forcemap-command-description = Forces the game to start with a given map next round.
|
||||
forcemap-command-help = forcemap <map ID>
|
||||
forcemap-command-need-one-argument = forcemap takes one argument, the path to the map file.
|
||||
forcemap-command-map-not-found = No eligible map exists with name { $map }.
|
||||
forcemap-command-success = Forced the game to start with map { $map } next round.
|
||||
forcemap-command-cleared = Cleared the forced map setting.
|
||||
forcemap-command-arg-map = <map ID>
|
||||
|
||||
@@ -3,5 +3,7 @@
|
||||
forcemap-command-description = Заставляет игру начать с заданной карты в следующем раунде.
|
||||
forcemap-command-help = forcemap <map ID>
|
||||
forcemap-command-need-one-argument = forcemap принимает один аргумент — путь к файлу карты.
|
||||
forcemap-command-map-not-found = Не существует подходящей карты с названием { $map }.
|
||||
forcemap-command-success = В следующем раунде игра принудительно начнется с карты { $map }.
|
||||
forcemap-command-cleared = Настройки принудительной карты сброшены.
|
||||
forcemap-command-arg-map = <map ID>
|
||||
|
||||
Reference in New Issue
Block a user