Merge pull request #4327 from pchote/map-upgrade-fix

Persist custom map package contents on save. Fixes #4318.
This commit is contained in:
Matthias Mailänder
2013-12-18 14:47:50 -08:00
2 changed files with 11 additions and 0 deletions

View File

@@ -284,6 +284,15 @@ namespace OpenRA
var s = root.WriteToString();
entries.Add("map.yaml", Encoding.UTF8.GetBytes(s));
// Add any custom assets
foreach (var file in Container.AllFileNames())
{
if (file == "map.bin" || file == "map.yaml")
continue;
entries.Add(file, Container.GetContent(file).ReadAllBytes());
}
// Saving the map to a new location
if (toPath != Path)
{