Add an upgrade rule for DeathSounds.DeathTypes
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace OpenRA.Mods.Common.UtilityCommands
|
||||
@@ -868,7 +867,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
var rearmSound = minelayerFields.FirstOrDefault(rs => rs.Key == "RearmSound");
|
||||
var minelayerRearmSound = rearmSound != null ? FieldLoader.GetValue<string>("RearmSound", rearmSound.Value.Value) : "minelay1.aud";
|
||||
|
||||
limitedAmmoFields.Add(new MiniYamlNode("RearmSound", minelayerRearmSound.ToString()));
|
||||
limitedAmmoFields.Add(new MiniYamlNode("RearmSound", minelayerRearmSound));
|
||||
minelayerFields.Remove(rearmSound);
|
||||
}
|
||||
}
|
||||
@@ -1001,6 +1000,22 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
node.Value.Nodes.RemoveAll(p => p.Key == "Voice");
|
||||
}
|
||||
|
||||
if (engineVersion < 20150524)
|
||||
{
|
||||
// Replace numbers with strings for DeathSounds.DeathType
|
||||
if (node.Key.StartsWith("DeathSounds"))
|
||||
{
|
||||
var deathTypes = node.Value.Nodes.FirstOrDefault(x => x.Key == "DeathTypes");
|
||||
if (deathTypes != null)
|
||||
{
|
||||
var types = FieldLoader.GetValue<string[]>("DeathTypes", deathTypes.Value.Value);
|
||||
deathTypes.Value.Value = string.Join(", ", types.Select(type => "DeathType" + type));
|
||||
|
||||
RenameDamageTypes(deathTypes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
|
||||
}
|
||||
}
|
||||
@@ -1420,7 +1435,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
}
|
||||
}
|
||||
|
||||
if (engineVersion < 20150517)
|
||||
if (engineVersion < 20150524)
|
||||
{
|
||||
// Remove DeathType from DamageWarhead
|
||||
if (node.Key.StartsWith("Warhead") && node.Value.Value == "SpreadDamage")
|
||||
|
||||
@@ -233,13 +233,13 @@
|
||||
Range: 1
|
||||
ScriptTriggers:
|
||||
DeathSounds@NORMAL:
|
||||
DeathTypes: 1, 2, 3, 4
|
||||
DeathTypes: DefaultDeath, BulletDeath, SmallExplosionDeath, ExplosionDeath
|
||||
DeathSounds@BURNED:
|
||||
DeathSound: Burned
|
||||
DeathTypes: 5
|
||||
DeathTypes: FireDeath
|
||||
DeathSounds@POISONED:
|
||||
DeathSound: Poisoned
|
||||
DeathTypes: 6
|
||||
DeathTypes: TiberiumDeath
|
||||
GainsStatUpgrades:
|
||||
SelfHealing@ELITE:
|
||||
Step: 2
|
||||
|
||||
@@ -230,7 +230,7 @@
|
||||
Huntable:
|
||||
ScriptTriggers:
|
||||
DeathSounds:
|
||||
DeathTypes: 1, 2, 3, 4
|
||||
DeathTypes: ExplosionDeath, SoundDeath, SmallExplosionDeath, BulletDeath
|
||||
Parachutable:
|
||||
FallRate: 130
|
||||
GainsStatUpgrades:
|
||||
|
||||
@@ -210,13 +210,13 @@
|
||||
Upgrades: hospitalheal
|
||||
Prerequisites: hosp
|
||||
DeathSounds@NORMAL:
|
||||
DeathTypes: 1, 2, 3, 4
|
||||
DeathTypes: DefaultDeath, BulletDeath, SmallExplosionDeath, ExplosionDeath
|
||||
DeathSounds@BURNED:
|
||||
DeathSound: Burned
|
||||
DeathTypes: 5
|
||||
DeathTypes: FireDeath
|
||||
DeathSounds@ZAPPED:
|
||||
DeathSound: Zapped
|
||||
DeathTypes: 6
|
||||
DeathTypes: ElectricityDeath
|
||||
Parachutable:
|
||||
ParachuteOffset: 0,0,427
|
||||
KilledOnImpassableTerrain: true
|
||||
|
||||
@@ -241,13 +241,13 @@
|
||||
Huntable:
|
||||
ScriptTriggers:
|
||||
DeathSounds@NORMAL:
|
||||
DeathTypes: 1, 2, 3
|
||||
DeathTypes: BulletDeath, SmallExplosionDeath, ExplosionDeath
|
||||
DeathSounds@BURNED:
|
||||
DeathSound: Burned
|
||||
DeathTypes: 5
|
||||
DeathTypes: FireDeath
|
||||
DeathSounds@ZAPPED:
|
||||
DeathSound: Zapped
|
||||
DeathTypes: 6
|
||||
DeathTypes: EnergyDeath
|
||||
UpgradeManager:
|
||||
Cloak@CLOAKGENERATOR:
|
||||
UpgradeTypes: cloakgenerator
|
||||
|
||||
Reference in New Issue
Block a user