Mapping: Check if map already exists (#5666)

This commit is contained in:
wrexbe
2021-12-02 20:25:50 -08:00
committed by GitHub
parent e7c2131d97
commit c4c139041c

View File

@@ -64,6 +64,12 @@ namespace Content.Server.GameTicking.Commands
return;
}
if (mapManager.MapExists(new MapId(mapId)))
{
shell.WriteLine($"Map {mapId} already exists");
return;
}
shell.ExecuteCommand("sudo cvar events.enabled false");
shell.ExecuteCommand($"addmap {mapId} false");
shell.ExecuteCommand($"loadbp {mapId} \"{CommandParsing.Escape(mapName)}\" true");