Force map confirmation (#29391)
* Add map check to forcemap command * remove debug line * remove accidental newline
This commit is contained in:
@@ -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)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user