Move AirThreshold to Warhead

To reduce duplication and for later use in more warheads.
This commit is contained in:
reaperrr
2020-05-08 12:08:52 +02:00
committed by abcdefg30
parent de81fc2aca
commit 2bdefe0e9e
3 changed files with 3 additions and 7 deletions

View File

@@ -44,10 +44,6 @@ namespace OpenRA.Mods.Common.Warheads
[Desc("Chance of impact sound to play.")] [Desc("Chance of impact sound to play.")]
public readonly int ImpactSoundChance = 100; public readonly int ImpactSoundChance = 100;
[Desc("Consider explosion above this altitude an air explosion.",
"If that's the case, this warhead will consider the explosion position to have the 'Air' TargetType (in addition to any nearby actor's TargetTypes).")]
public readonly WDist AirThreshold = new WDist(128);
[Desc("Whether to consider actors in determining whether the explosion should happen. If false, only terrain will be considered.")] [Desc("Whether to consider actors in determining whether the explosion should happen. If false, only terrain will be considered.")]
public readonly bool ImpactActors = true; public readonly bool ImpactActors = true;

View File

@@ -26,9 +26,6 @@ namespace OpenRA.Mods.Common.Warheads
[Desc("Type of smudge to apply to terrain.")] [Desc("Type of smudge to apply to terrain.")]
public readonly HashSet<string> SmudgeType = new HashSet<string>(); public readonly HashSet<string> SmudgeType = new HashSet<string>();
[Desc("How close to ground must the impact happen to spawn smudges.")]
public readonly WDist AirThreshold = new WDist(128);
[Desc("Percentual chance the smudge is created.")] [Desc("Percentual chance the smudge is created.")]
public readonly int Chance = 100; public readonly int Chance = 100;

View File

@@ -46,6 +46,9 @@ namespace OpenRA.Mods.Common.Warheads
[Desc("Can this warhead affect the actor that fired it.")] [Desc("Can this warhead affect the actor that fired it.")]
public readonly bool AffectsParent = false; public readonly bool AffectsParent = false;
[Desc("If impact is above this altitude, warheads that would affect terrain ignore terrain target types (and either do nothing or perform their own checks).")]
public readonly WDist AirThreshold = new WDist(128);
[Desc("Delay in ticks before applying the warhead effect.", "0 = instant (old model).")] [Desc("Delay in ticks before applying the warhead effect.", "0 = instant (old model).")]
public readonly int Delay = 0; public readonly int Delay = 0;