Merge pull request #10381 from penev92/warheadEffects

Enhance CreateEffectWarhead
This commit is contained in:
Oliver Brakmann
2016-02-06 13:35:52 +01:00
36 changed files with 511 additions and 488 deletions

View File

@@ -3432,6 +3432,23 @@ namespace OpenRA.Mods.Common.UtilityCommands
node.Value.Nodes.RemoveAll(x => x.Key == "Charges");
}
// Enhance CreateEffectWarhead
if (engineVersion < 20160131)
{
if (node.Key.StartsWith("Warhead") && node.Value.Value == "CreateEffect")
{
// Add support for multiple explosions to CreateEffectWarhead
var explosionNode = node.Value.Nodes.FirstOrDefault(x => x.Key == "Explosion");
if (explosionNode != null)
explosionNode.Key = "Explosions";
// Add support for multiple impact sounds to CreateEffectWarhead
var impactSoundNode = node.Value.Nodes.FirstOrDefault(x => x.Key == "ImpactSound");
if (impactSoundNode != null)
impactSoundNode.Key = "ImpactSounds";
}
}
UpgradeWeaponRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
}
}