Add upgrade rules and update d2k.
This commit is contained in:
@@ -477,6 +477,27 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (engineVersion < 20161119)
|
||||||
|
{
|
||||||
|
// Migrated carryalls over to new conditions system
|
||||||
|
var carryableUpgradesNode = node.Value.Nodes.FirstOrDefault(n => n.Key == "CarryableUpgrades");
|
||||||
|
if (carryableUpgradesNode != null)
|
||||||
|
{
|
||||||
|
var conditions = FieldLoader.GetValue<string[]>("", carryableUpgradesNode.Value.Value);
|
||||||
|
if (conditions.Length > 1)
|
||||||
|
Console.WriteLine("Unable to automatically migrate {0}:{1} CarryableUpgrades to CarriedCondition. This must be corrected manually",
|
||||||
|
parent.Key, node.Key);
|
||||||
|
else
|
||||||
|
carryableUpgradesNode.Key = "CarriedCondition";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (node.Key == "WithDecorationCarryable")
|
||||||
|
{
|
||||||
|
node.Key = "WithDecoration@CARRYALL";
|
||||||
|
node.Value.Nodes.Add(new MiniYamlNode("RequiresCondition", "carryall-reserved"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);
|
UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -159,11 +159,12 @@
|
|||||||
Voiced:
|
Voiced:
|
||||||
VoiceSet: VehicleVoice
|
VoiceSet: VehicleVoice
|
||||||
AutoCarryable:
|
AutoCarryable:
|
||||||
CarryableUpgrades: notmobile
|
CarriedCondition: notmobile
|
||||||
WithDecorationCarryable:
|
WithDecoration@CARRYALL:
|
||||||
Image: pips
|
Image: pips
|
||||||
Sequence: pickup-indicator
|
Sequence: pickup-indicator
|
||||||
Offset: -12, -12
|
Offset: -12, -12
|
||||||
|
RequiresCondition: carryall-reserved
|
||||||
|
|
||||||
^Tank:
|
^Tank:
|
||||||
Inherits: ^Vehicle
|
Inherits: ^Vehicle
|
||||||
|
|||||||
Reference in New Issue
Block a user