diff --git a/OpenRA.Utility/UpgradeRules.cs b/OpenRA.Utility/UpgradeRules.cs index 461951cff4..d75ae47cda 100644 --- a/OpenRA.Utility/UpgradeRules.cs +++ b/OpenRA.Utility/UpgradeRules.cs @@ -258,7 +258,7 @@ namespace OpenRA.Utility node.Key = "StoresResources"; } - // make animation is now it's own trait + // make animation is now its own trait if (engineVersion < 20140621) { if (depth == 1 && (node.Key.StartsWith("RenderBuilding"))) @@ -472,6 +472,22 @@ namespace OpenRA.Utility node.Key = "RenderInfantry"; } + // InfDeath was renamed to DeathType + if (engineVersion < 20140830) + { + if (depth == 1 && parentKey.StartsWith("DeathSounds")) + { + if (depth == 2 && node.Key == "InfDeaths") + node.Key = "DeathTypes"; + } + + if (depth == 2 && parentKey == "SpawnsViceroid" && node.Key == "InfDeath") + node.Key = "DeathType"; + + if (depth == 2 && parentKey == "Explodes" && node.Key == "InfDeath") + node.Key = "DeathType"; + } + UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1); } } @@ -784,6 +800,15 @@ namespace OpenRA.Utility ConvertFloatArrayToPercentArray(ref node.Value.Value); } + if (engineVersion < 20140830) + { + if (depth == 2) + { + if (node.Key == "InfDeath") + node.Key = "DeathType"; + } + } + UpgradeWeaponRules(engineVersion, ref node.Value.Nodes, node, depth + 1); } }