diff --git a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs index f2d2f23de9..c2bfb4cf15 100644 --- a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs +++ b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs @@ -1861,7 +1861,21 @@ namespace OpenRA.Mods.Common.UtilityCommands internal static void UpgradePlayers(int engineVersion, ref List nodes, MiniYamlNode parent, int depth) { foreach (var node in nodes) + { + // Rename PlayerReference.Race and LockRace to Faction and LockFaction + if (engineVersion < 20150706) + { + var race = node.Value.Nodes.FirstOrDefault(x => x.Key == "Race"); + if (race != null) + race.Key = "Faction"; + + var lockRace = node.Value.Nodes.FirstOrDefault(x => x.Key == "LockRace"); + if (lockRace != null) + lockRace.Key = "LockFaction"; + } + UpgradePlayers(engineVersion, ref node.Value.Nodes, node, depth + 1); + } } internal static void UpgradeActors(int engineVersion, ref List nodes, MiniYamlNode parent, int depth)