Convert GainsExperience to conditions.
This commit is contained in:
@@ -675,6 +675,21 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
ConvertUpgradesToCondition(parent, node, "UndeployedUpgrades", "UndeployedCondition");
|
||||
ConvertUpgradesToCondition(parent, node, "DeployedUpgrades", "DeployedCondition");
|
||||
}
|
||||
|
||||
if (node.Key == "GainsExperience")
|
||||
{
|
||||
var upgrades = node.Value.Nodes.FirstOrDefault(n => n.Key == "Upgrades");
|
||||
if (upgrades != null)
|
||||
{
|
||||
upgrades.Key = "Conditions";
|
||||
foreach (var n in upgrades.Value.Nodes)
|
||||
{
|
||||
var conditions = FieldLoader.GetValue<string[]>("", n.Value.Value);
|
||||
if (conditions.Length > 1)
|
||||
Console.WriteLine("Unable to automatically migrate multiple GainsExperience upgrades to a condition. This must be corrected manually");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);
|
||||
|
||||
Reference in New Issue
Block a user