Merge pull request #9942 from abcdefg30/descexplodes
Fix the documentation of Explodes
This commit is contained in:
@@ -35,8 +35,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Health level at which actor will explode.")]
|
||||
public readonly int DamageThreshold = 0;
|
||||
|
||||
[Desc("DeathType(s) to apply upon explosion.")]
|
||||
public readonly HashSet<string> DeathType = new HashSet<string>();
|
||||
[Desc("DeathType(s) that trigger the explosion. Leave empty to always trigger an explosion.")]
|
||||
public readonly HashSet<string> DeathTypes = new HashSet<string>();
|
||||
|
||||
public WeaponInfo WeaponInfo { get; private set; }
|
||||
public WeaponInfo EmptyWeaponInfo { get; private set; }
|
||||
@@ -70,7 +70,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
return;
|
||||
|
||||
var warhead = e.Warhead as DamageWarhead;
|
||||
if (info.DeathType.Count > 0 && warhead != null && !warhead.DamageTypes.Overlaps(info.DeathType))
|
||||
if (info.DeathTypes.Count > 0 && warhead != null && !warhead.DamageTypes.Overlaps(info.DeathTypes))
|
||||
return;
|
||||
|
||||
var weapon = ChooseWeaponForExplosion(self);
|
||||
|
||||
@@ -2377,6 +2377,17 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
node.Key = "ParticleSize";
|
||||
}
|
||||
|
||||
// DeathType on Explodes was renamed to DeathTypes
|
||||
if (engineVersion < 20151110)
|
||||
{
|
||||
if (node.Key == "Explodes")
|
||||
{
|
||||
var dt = node.Value.Nodes.FirstOrDefault(n => n.Key == "DeathType");
|
||||
if (dt != null)
|
||||
dt.Key = "DeathTypes";
|
||||
}
|
||||
}
|
||||
|
||||
UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user