Rename UnitUpgradeCrateAction to GrantUpgradeCrateAction.

This commit is contained in:
Paul Chote
2014-09-28 21:22:50 +13:00
parent 22574e920b
commit 8a014393a3
8 changed files with 27 additions and 11 deletions

View File

@@ -627,6 +627,22 @@ namespace OpenRA.Mods.Common.UtilityCommands
node.Key = "KillsSelf";
node.Value.Nodes.Add(new MiniYamlNode("RemoveInstead", new MiniYaml("true")));
}
if (depth == 1 && node.Key.StartsWith("UnitUpgradeCrateAction"))
{
var parts = node.Key.Split('@');
node.Key = "GrantUpgradeCrateAction";
if (parts.Length > 1)
node.Key += "@" + parts[1];
}
if (depth == 1 && node.Key.StartsWith("-UnitUpgradeCrateAction"))
{
var parts = node.Key.Split('@');
node.Key = "-GrantUpgradeCrateAction";
if (parts.Length > 1)
node.Key += "@" + parts[1];
}
}
UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);