From 1dcc43801ac2f744dae36b3f33a91e4ec57cb30e Mon Sep 17 00:00:00 2001 From: Oliver Brakmann Date: Sun, 21 Feb 2016 18:57:48 +0100 Subject: [PATCH] Fix broken map format upgrade --- OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs index eca15f45ea..ed454b9685 100644 --- a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs +++ b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs @@ -3680,6 +3680,8 @@ namespace OpenRA.Mods.Common.UtilityCommands } } + yaml.Nodes.First(n => n.Key == "MapFormat").Value = new MiniYaml(Map.SupportedMapFormat.ToString()); + var entries = new Dictionary(); entries.Add("map.yaml", Encoding.UTF8.GetBytes(yaml.Nodes.WriteToString())); foreach (var file in package.Contents) @@ -3689,6 +3691,8 @@ namespace OpenRA.Mods.Common.UtilityCommands entries.Add(file, package.GetStream(file).ReadAllBytes()); } + + package.Write(entries); } } }