From 8c2c9462542a80cbc0e3a2805cb0120918b78a17 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Mon, 9 Nov 2015 15:32:57 +0100 Subject: [PATCH] Add an upgrade rule for the DeathType -> DeathTypes change --- OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs index ddb9f9cd0f..a9494682ee 100644 --- a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs +++ b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs @@ -2377,6 +2377,17 @@ namespace OpenRA.Mods.Common.UtilityCommands node.Key = "ParticleSize"; } + // DeathType on Explodes was renamed to DeathTypes + if (engineVersion < 20151110) + { + if (node.Key == "Explodes") + { + var dt = node.Value.Nodes.FirstOrDefault(n => n.Key == "DeathType"); + if (dt != null) + dt.Key = "DeathTypes"; + } + } + UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1); } }