diff --git a/Content.Server/GameTicking/Commands/ForceMapCommand.cs b/Content.Server/GameTicking/Commands/ForceMapCommand.cs index 5d2191fb52..a005e011eb 100644 --- a/Content.Server/GameTicking/Commands/ForceMapCommand.cs +++ b/Content.Server/GameTicking/Commands/ForceMapCommand.cs @@ -28,11 +28,22 @@ namespace Content.Server.GameTicking.Commands var gameMap = IoCManager.Resolve(); 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) diff --git a/Resources/Locale/en-US/game-ticking/forcemap-command.ftl b/Resources/Locale/en-US/game-ticking/forcemap-command.ftl index df2ca68786..573aa78a28 100644 --- a/Resources/Locale/en-US/game-ticking/forcemap-command.ftl +++ b/Resources/Locale/en-US/game-ticking/forcemap-command.ftl @@ -3,5 +3,7 @@ forcemap-command-description = Forces the game to start with a given map next round. forcemap-command-help = forcemap 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 = diff --git a/Resources/Locale/ru-RU/game-ticking/forcemap-command.ftl b/Resources/Locale/ru-RU/game-ticking/forcemap-command.ftl index 224d2bf1b7..3dc203cf82 100644 --- a/Resources/Locale/ru-RU/game-ticking/forcemap-command.ftl +++ b/Resources/Locale/ru-RU/game-ticking/forcemap-command.ftl @@ -3,5 +3,7 @@ forcemap-command-description = Заставляет игру начать с заданной карты в следующем раунде. forcemap-command-help = forcemap forcemap-command-need-one-argument = forcemap принимает один аргумент — путь к файлу карты. +forcemap-command-map-not-found = Не существует подходящей карты с названием { $map }. forcemap-command-success = В следующем раунде игра принудительно начнется с карты { $map }. +forcemap-command-cleared = Настройки принудительной карты сброшены. forcemap-command-arg-map =