Mapping: Check if map already exists (#5666)
This commit is contained in:
@@ -64,6 +64,12 @@ namespace Content.Server.GameTicking.Commands
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mapManager.MapExists(new MapId(mapId)))
|
||||||
|
{
|
||||||
|
shell.WriteLine($"Map {mapId} already exists");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
shell.ExecuteCommand("sudo cvar events.enabled false");
|
shell.ExecuteCommand("sudo cvar events.enabled false");
|
||||||
shell.ExecuteCommand($"addmap {mapId} false");
|
shell.ExecuteCommand($"addmap {mapId} false");
|
||||||
shell.ExecuteCommand($"loadbp {mapId} \"{CommandParsing.Escape(mapName)}\" true");
|
shell.ExecuteCommand($"loadbp {mapId} \"{CommandParsing.Escape(mapName)}\" true");
|
||||||
|
|||||||
Reference in New Issue
Block a user