forcemap update

This commit is contained in:
BIGZi0348
2024-12-01 14:44:49 +03:00
parent ab063997f7
commit 2f9a2ed9ec
3 changed files with 17 additions and 2 deletions

View File

@@ -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)