Force map confirmation (#29391)

* Add map check to forcemap command

* remove debug line

* remove accidental newline
This commit is contained in:
ArkiveDev
2024-06-24 06:56:21 -04:00
committed by GitHub
parent c6e5b2339e
commit d9506ce3a6

View File

@@ -29,6 +29,12 @@ namespace Content.Server.GameTicking.Commands
var gameMap = IoCManager.Resolve<IGameMapManager>();
var name = args[0];
if (!gameMap.TrySelectMapIfEligible(name))
{
shell.WriteLine($"No eligible map exists with name {name}.");
return;
}
_configurationManager.SetCVar(CCVars.GameMap, name);
shell.WriteLine(Loc.GetString("forcemap-command-success", ("map", name)));
}