Add a UnitUpgradeManager trait.

This introduces support for timed upgrades, starting with crate buffs.
This commit is contained in:
Paul Chote
2014-09-26 13:02:34 +12:00
parent b4c826237e
commit c697a1e7b4
11 changed files with 268 additions and 38 deletions

View File

@@ -575,6 +575,13 @@ namespace OpenRA.Mods.Common.UtilityCommands
}
}
// Routed unit upgrades via the UnitUpgradeManager trait
if (engineVersion < 20141001)
{
if (depth == 0 && node.Value.Nodes.Any(n => n.Key.StartsWith("GainsStatUpgrades")))
node.Value.Nodes.Add(new MiniYamlNode("UnitUpgradeManager", new MiniYaml("")));
}
UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
}
}