Allow maps to be loaded directly, bypassing the MapCache.

This commit is contained in:
Paul Chote
2025-03-02 14:00:40 +00:00
committed by Gustas Kažukauskas
parent e186dc428e
commit fceb8a479d
3 changed files with 25 additions and 15 deletions

View File

@@ -188,13 +188,12 @@ namespace OpenRA
bool wasLoadingGameSave;
internal World(string mapUID, ModData modData, OrderManager orderManager, WorldType type)
internal World(Map map, ModData modData, OrderManager orderManager, WorldType type)
{
this.modData = modData;
Type = type;
OrderManager = orderManager;
using (new PerfTimer("PrepareMap"))
Map = modData.PrepareMap(mapUID);
Map = map;
if (string.IsNullOrEmpty(modData.Manifest.DefaultOrderGenerator))
throw new InvalidDataException("mod.yaml must define a DefaultOrderGenerator");