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 // SpawnViceroid was replaced by LeavesHusk
if (engineVersion < 20150719) if (engineVersion < 20150809)
{ {
if (node.Key == "SpawnViceroid") if (node.Key == "SpawnViceroid")
{ {
node.Key = "LeavesHusk"; node.Key = "LeavesHusk";
// The default value of ViceroidActor was vice
var actor = node.Value.Nodes.FirstOrDefault(n => n.Key == "ViceroidActor"); var actor = node.Value.Nodes.FirstOrDefault(n => n.Key == "ViceroidActor");
if (actor != null) if (actor != null)
actor.Key = "HuskActor"; actor.Key = "HuskActor";
// The default value of ViceroidActor was "vice"
else else
node.Value.Nodes.Add(new MiniYamlNode("HuskActor", "vice")); 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 // The default value of Probability was 10
var probability = node.Value.Nodes.FirstOrDefault(n => n.Key == "Probability");
if (probability == null) if (probability == null)
node.Value.Nodes.Add(new MiniYamlNode("Probability", "10")); 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 GenericVisibility: Enemy
ShowOwnerRow: false ShowOwnerRow: false
^Infantry: ^Infantry:
SpawnViceroid: -LeavesHusk:
Probability: 0
Tooltip: Tooltip:
GenericVisibility: Enemy GenericVisibility: Enemy
ShowOwnerRow: false ShowOwnerRow: false

View File

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

View File

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

View File

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

View File

@@ -79,7 +79,7 @@ CYC2:
Mobile: Mobile:
Speed: 56 Speed: 56
Health: Health:
HP: 500 HP: 500
Passenger: Passenger:
RevealsShroud: RevealsShroud:
Range: 7c0 Range: 7c0