Add support for multiple explosions to CreateEffectWarhead
Have the engine pick one explosion at random from the provided list.
This commit is contained in:
@@ -3432,6 +3432,18 @@ 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";
|
||||
}
|
||||
}
|
||||
|
||||
UpgradeWeaponRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user