Fixes as per comments. (+1 squashed commits)

Squashed commits:

[c3abf4b] Fixes as per comments. (+1 squashed commits)

Squashed commits:

[a289d17] Regression and UpgradeRules fix for #5921.
This commit is contained in:
UberWaffe
2014-07-23 16:36:51 +02:00
parent 51316a76cc
commit 2b73fa027b
2 changed files with 18 additions and 1 deletions

View File

@@ -316,6 +316,18 @@ namespace OpenRA.Utility
}
}
// GiveUnitCrateAction and GiveMcvCrateAction were updated to allow multiple units
if (engineVersion < 20140723)
{
if (depth == 2 && parentKey.Contains("GiveMcvCrateAction"))
if (node.Key == "Unit")
node.Key = "Units";
if (depth == 2 && parentKey.Contains("GiveUnitCrateAction"))
if (node.Key == "Unit")
node.Key = "Units";
}
UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
}
}

View File

@@ -17,10 +17,15 @@ CRATE:
CloakCrateAction:
SelectionShares: 5
Effect: cloak
DuplicateUnitCrateAction:
SelectionShares: 10
MaxAmount: 5
MinAmount: 1
MaxDuplicatesWorth: 1250
GiveMcvCrateAction:
SelectionShares: 0
NoBaseSelectionShares: 120
Unit: mcv
Units: mcv
RenderSprites:
Palette: effect
WithCrateBody: