Refactor supply traits to *Cash traits

Adding 'Type' and 'Stances' support as well.
This commit is contained in:
reaperrr
2017-03-20 20:13:10 +01:00
parent 361cbc34cc
commit 80ec530e4c
13 changed files with 83 additions and 47 deletions

View File

@@ -582,6 +582,20 @@ namespace OpenRA.Mods.Common.UtilityCommands
if (engineVersion < 20170318)
node.Value.Nodes.RemoveAll(n => n.Key == "ActorGroupProxy");
// Refactor SupplyTruck/AcceptsSupplies traits to DeliversCash/AcceptsDeliveredCash
if (engineVersion < 20170415)
{
if (node.Key == "SupplyTruck")
RenameNodeKey(node, "DeliversCash");
if (node.Key == "-SupplyTruck")
RenameNodeKey(node, "-DeliversCash");
if (node.Key == "AcceptsSupplies")
RenameNodeKey(node, "AcceptsDeliveredCash");
if (node.Key == "-AcceptsSupplies")
RenameNodeKey(node, "-AcceptsDeliveredCash");
}
UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);
}