Update the UID stored in the map file after saving.
This commit is contained in:
@@ -603,6 +603,9 @@ namespace OpenRA
|
|||||||
|
|
||||||
// Update existing package
|
// Update existing package
|
||||||
Container.Write(entries);
|
Container.Write(entries);
|
||||||
|
|
||||||
|
// Update UID to match the newly saved data
|
||||||
|
Uid = ComputeHash();
|
||||||
}
|
}
|
||||||
|
|
||||||
public CellLayer<TerrainTile> LoadMapTiles()
|
public CellLayer<TerrainTile> LoadMapTiles()
|
||||||
|
|||||||
@@ -145,9 +145,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
|
|
||||||
map.Save(combinedPath);
|
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
|
// Update the map cache so it can be loaded without restarting the game
|
||||||
var classification = mapDirectories[directoryDropdown.Text];
|
var classification = mapDirectories[directoryDropdown.Text];
|
||||||
Game.ModData.MapCache[map.Uid].UpdateFromMap(map, classification);
|
Game.ModData.MapCache[map.Uid].UpdateFromMap(map, classification);
|
||||||
|
|||||||
Reference in New Issue
Block a user