Upgrade rule for moving Cursor to SupportPower.

This commit is contained in:
Taryn Hill
2015-05-01 14:35:45 -05:00
parent 17a16ac8e0
commit 4f222acf61

View File

@@ -1460,6 +1460,18 @@ namespace OpenRA.Mods.Common.UtilityCommands
}
}
if (engineVersion < 20150526)
{
var isNukePower = node.Key == "NukePower";
var isIonCannonPower = node.Key == "IonCannonPower";
if ((isNukePower || isIonCannonPower) && !node.Value.Nodes.Any(n => n.Key == "Cursor"))
{
var cursor = isIonCannonPower ? "ioncannon" : "nuke";
node.Value.Nodes.Add(new MiniYamlNode("Cursor", cursor));
}
}
UpgradeWeaponRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
}
}