Upgrade rule for UpgradeOnDamage to UpgradeOnDamageState

This commit is contained in:
reaperrr
2016-08-18 22:08:00 +02:00
parent b174d00be9
commit cd03bc6883

View File

@@ -280,6 +280,17 @@ namespace OpenRA.Mods.Common.UtilityCommands
}
}
if (engineVersion < 20160818)
{
if (depth == 1 && node.Key.StartsWith("UpgradeOnDamage"))
{
var parts = node.Key.Split('@');
node.Key = "UpgradeOnDamageState";
if (parts.Length > 1)
node.Key += "@" + parts[1];
}
}
UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);
}