From ea19f7cd54fe67995e7cdd2ac041ea99ce204d22 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Sat, 21 Nov 2015 21:39:17 +0100 Subject: [PATCH] Add an upgrade rule for the Upgrades -> DeployedUpgrades change --- OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs index a9494682ee..74a5db7f47 100644 --- a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs +++ b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs @@ -2388,6 +2388,17 @@ namespace OpenRA.Mods.Common.UtilityCommands } } + // Upgrades on DeployToUpgrade were renamed to DeployedUpgrades + if (engineVersion < 20151122) + { + if (node.Key == "DeployToUpgrade") + { + var u = node.Value.Nodes.FirstOrDefault(n => n.Key == "Upgrades"); + if (u != null) + u.Key = "DeployedUpgrades"; + } + } + UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1); } }