Replace CloakCrateAction with upgrades.

This commit is contained in:
Paul Chote
2014-07-30 21:38:44 +12:00
parent 2d062b790b
commit 1a4f476ffa
10 changed files with 43 additions and 91 deletions

View File

@@ -369,6 +369,21 @@ namespace OpenRA.Utility
{
if (depth == 0 && node.Value.Nodes.Any(n => n.Key.StartsWith("GainsExperience")))
node.Value.Nodes.Add(new MiniYamlNode("GainsStatUpgrades", new MiniYaml("")));
if (depth == 1 && node.Key == "-CloakCrateAction")
node.Key = "-UnitUpgradeCrateAction@cloak";
if (depth == 1 && node.Key == "CloakCrateAction")
{
node.Key = "UnitUpgradeCrateAction@cloak";
node.Value.Nodes.Add(new MiniYamlNode("Upgrades", new MiniYaml("cloak")));
}
if (depth == 2 && node.Key == "RequiresCrate" && parentKey == "Cloak")
{
node.Key = "RequiresUpgrade";
node.Value.Value = "cloak";
}
}
UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);