Merge pull request #4327 from pchote/map-upgrade-fix
Persist custom map package contents on save. Fixes #4318.
This commit is contained in:
@@ -116,6 +116,8 @@ NEW:
|
||||
Renamed Game.Mods launch argument to Game.Mod.
|
||||
Linux packages now install to /usr/lib/openra for consistency with other Mono applications.
|
||||
Added an optional map.yaml check to the OpenRA.Lint.exe command line tool.
|
||||
Map Editor:
|
||||
Fixed custom assets being removed when saving an oramap.
|
||||
Mod / Custom map compatibility:
|
||||
Mods can now include traits from TD and D2K in RA.
|
||||
Mods can now customize UI text settings like font type/color/contrast for most widgets and set global defaults in metrics.yaml.
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user