Add an upgrade rule and update the default mods

This commit is contained in:
abcdefg30
2015-08-08 22:46:24 +02:00
parent 538723f8fb
commit abf5047072
6 changed files with 34 additions and 11 deletions

View File

@@ -1688,23 +1688,41 @@ namespace OpenRA.Mods.Common.UtilityCommands
}
// SpawnViceroid was replaced by LeavesHusk
if (engineVersion < 20150719)
if (engineVersion < 20150809)
{
if (node.Key == "SpawnViceroid")
{
node.Key = "LeavesHusk";
// The default value of ViceroidActor was vice
var actor = node.Value.Nodes.FirstOrDefault(n => n.Key == "ViceroidActor");
if (actor != null)
actor.Key = "HuskActor";
// The default value of ViceroidActor was "vice"
else
node.Value.Nodes.Add(new MiniYamlNode("HuskActor", "vice"));
var probability = node.Value.Nodes.FirstOrDefault(n => n.Key == "Probability");
// The default value of Probability was 10
var probability = node.Value.Nodes.FirstOrDefault(n => n.Key == "Probability");
if (probability == null)
node.Value.Nodes.Add(new MiniYamlNode("Probability", "10"));
// The default value of Owner was Creeps
var owner = node.Value.Nodes.FirstOrDefault(n => n.Key == "Owner");
if (owner != null)
{
node.Value.Nodes.Add(new MiniYamlNode("OwnerType", "InternalName"));
owner.Key = "InternalOwner";
}
else
{
node.Value.Nodes.Add(new MiniYamlNode("OwnerType", "InternalName"));
node.Value.Nodes.Add(new MiniYamlNode("InternalOwner", "Creeps"));
}
// The default value of DeathType was TiberiumDeath
var deathType = node.Value.Nodes.FirstOrDefault(n => n.Key == "DeathType");
if (deathType == null)
node.Value.Nodes.Add(new MiniYamlNode("DeathType", "TiberiumDeath"));
}
}

View File

@@ -817,8 +817,7 @@ Rules:
GenericVisibility: Enemy
ShowOwnerRow: false
^Infantry:
SpawnViceroid:
Probability: 0
-LeavesHusk:
Tooltip:
GenericVisibility: Enemy
ShowOwnerRow: false

View File

@@ -662,8 +662,7 @@ Rules:
GenericVisibility: Enemy
ShowOwnerRow: false
^Infantry:
SpawnViceroid:
Probability: 0
-LeavesHusk:
Tooltip:
GenericVisibility: Enemy
ShowOwnerRow: false

View File

@@ -190,8 +190,12 @@
HiddenUnderFog:
PoisonedByTiberium:
ActorLostNotification:
SpawnViceroid:
LeavesHusk:
Probability: 10
HuskActor: vice
OwnerType: InternalName
InternalOwner: Creeps
DeathType: TiberiumDeath
Crushable:
WarnProbability: 67
CrushSound: squish2.aud

View File

@@ -256,8 +256,11 @@
Crushable:
CrushSound: squish6.aud
PoisonedByTiberium:
SpawnViceroid:
ViceroidActor: vissml
LeavesHusk:
HuskActor: vissml
Probability: 10
OwnerType: InternalName
InternalOwner: Creeps
DeathType: EnergyDeath # TODO: FIX ME! (Tiberium currently uses the wrong damage type!)
Guard:
Voice: Move