Merge pull request #10337 from RoosterDragon/fix-upgrade

Fix UpgradeChromeMetrics.
This commit is contained in:
Matthias Mailänder
2015-12-30 23:48:33 +01:00

View File

@@ -3410,13 +3410,15 @@ namespace OpenRA.Mods.Common.UtilityCommands
internal static void UpgradeChromeLayout(int engineVersion, ref List<MiniYamlNode> nodes, MiniYamlNode parent, int depth)
{
var parentKey = parent != null ? parent.Key.Split('@').First() : null;
foreach (var node in nodes)
{
if (engineVersion < 20151102)
{
if (node.Key == "Color" || node.Key == "ReadyTextAltColor" || node.Key == "TextColor" || node.Key == "TextColorDisabled")
{
if (parent.Key.StartsWith("MapPreview@"))
if (parentKey == "MapPreview")
TryUpdateHSLColor(ref node.Value.Value);
else
TryUpdateColor(ref node.Value.Value);