Update the MapCache with the correct UID.
This commit is contained in:
@@ -130,8 +130,15 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
map.RequiresMod = Game.ModData.Manifest.Mod.Id;
|
||||
|
||||
var combinedPath = Platform.ResolvePath(Path.Combine(directoryDropdown.Text, filename.Text + fileTypes[typeDropdown.Text]));
|
||||
|
||||
// Invalidate the old map metadata
|
||||
Game.ModData.MapCache[map.Uid].Invalidate();
|
||||
|
||||
map.Save(combinedPath);
|
||||
|
||||
// Reload map to calculate new UID
|
||||
map = new Map(combinedPath);
|
||||
|
||||
// Update the map cache so it can be loaded without restarting the game
|
||||
var classification = mapDirectories[directoryDropdown.Text];
|
||||
Game.ModData.MapCache[map.Uid].UpdateFromMap(map, classification);
|
||||
|
||||
Reference in New Issue
Block a user