Replace map type with a category list.

This commit is contained in:
Paul Chote
2016-03-08 22:02:42 +00:00
parent 85c20e7adf
commit 96eda08677
8 changed files with 101 additions and 49 deletions

View File

@@ -994,6 +994,14 @@ namespace OpenRA.Mods.Common.UtilityCommands
yaml.Nodes.Add(new MiniYamlNode("LockPreview", new MiniYaml("True")));
}
// Format 10 -> 11 replaced the single map type field with a list of categories
if (mapFormat < 11)
{
var type = yaml.Nodes.First(n => n.Key == "Type");
yaml.Nodes.Add(new MiniYamlNode("Categories", type.Value));
yaml.Nodes.Remove(type);
}
if (mapFormat < Map.SupportedMapFormat)
{
yaml.Nodes.First(n => n.Key == "MapFormat").Value = new MiniYaml(Map.SupportedMapFormat.ToString());