Merge pull request #8659 from penev92/bleed_playerReference

Rename PlayerReference.Race to Faction
This commit is contained in:
Oliver Brakmann
2015-07-14 20:15:56 +02:00
166 changed files with 440 additions and 425 deletions

View File

@@ -2013,7 +2013,21 @@ namespace OpenRA.Mods.Common.UtilityCommands
internal static void UpgradePlayers(int engineVersion, ref List<MiniYamlNode> 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<MiniYamlNode> nodes, MiniYamlNode parent, int depth)