From 50ad3b64d8ac0aa798f409431afe303ee920c8f2 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Wed, 18 Dec 2013 21:50:49 +1300 Subject: [PATCH 1/2] Persist custom map package contents on save. Fixes #4318. --- OpenRA.Game/Map.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/OpenRA.Game/Map.cs b/OpenRA.Game/Map.cs index 3978168af8..6130a0a783 100644 --- a/OpenRA.Game/Map.cs +++ b/OpenRA.Game/Map.cs @@ -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) { From 9ef971a1596202c4a339f8c94113b557206abf25 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Wed, 18 Dec 2013 22:22:24 +1300 Subject: [PATCH 2/2] Update CHANGELOG. --- CHANGELOG | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 9cf20b7042..ff6a322251 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -113,6 +113,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.