Fix IDE0090
This commit is contained in:
committed by
Pavel Penev
parent
164abfdae1
commit
8a285f9b19
@@ -51,7 +51,7 @@ namespace OpenRA.Mods.Common.Warheads
|
||||
[Desc("The maximum inaccuracy of the effect spawn position relative to actual impact position.")]
|
||||
public readonly WDist Inaccuracy = WDist.Zero;
|
||||
|
||||
static readonly BitSet<TargetableType> TargetTypeAir = new BitSet<TargetableType>("Air");
|
||||
static readonly BitSet<TargetableType> TargetTypeAir = new("Air");
|
||||
|
||||
/// <summary>Checks if there are any actors at impact position and if the warhead is valid against any of them.</summary>
|
||||
ImpactActorType ActorTypeAtImpact(World world, WPos pos, Actor firedBy)
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace OpenRA.Mods.Common.Warheads
|
||||
public readonly BitSet<DamageType> DamageTypes = default;
|
||||
|
||||
[Desc("Damage percentage versus each armor type.")]
|
||||
public readonly Dictionary<string, int> Versus = new Dictionary<string, int>();
|
||||
public readonly Dictionary<string, int> Versus = new();
|
||||
|
||||
public override bool IsValidAgainst(Actor victim, Actor firedBy)
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace OpenRA.Mods.Common.Warheads
|
||||
public readonly int ResourceAmount = 0;
|
||||
|
||||
[Desc("Resource types to remove with this warhead.", "If empty, all resource types will be removed.")]
|
||||
public readonly HashSet<string> ResourceTypes = new HashSet<string>();
|
||||
public readonly HashSet<string> ResourceTypes = new();
|
||||
|
||||
public override void DoImpact(in Target target, WarheadArgs args)
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace OpenRA.Mods.Common.Warheads
|
||||
public readonly int[] Size = { 0, 0 };
|
||||
|
||||
[Desc("Type of smudge to apply to terrain.")]
|
||||
public readonly HashSet<string> SmudgeType = new HashSet<string>();
|
||||
public readonly HashSet<string> SmudgeType = new();
|
||||
|
||||
[Desc("Percentage chance the smudge is created.")]
|
||||
public readonly int Chance = 100;
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace OpenRA.Mods.Common.Warheads
|
||||
public readonly int Intensity = 0;
|
||||
|
||||
[Desc("Shake multipliers by the X and Y axis, comma-separated.")]
|
||||
public readonly float2 Multiplier = new float2(0, 0);
|
||||
public readonly float2 Multiplier = new(0, 0);
|
||||
|
||||
public override void DoImpact(in Target target, WarheadArgs args)
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace OpenRA.Mods.Common.Warheads
|
||||
public class SpreadDamageWarhead : DamageWarhead, IRulesetLoaded<WeaponInfo>
|
||||
{
|
||||
[Desc("Range between falloff steps.")]
|
||||
public readonly WDist Spread = new WDist(43);
|
||||
public readonly WDist Spread = new(43);
|
||||
|
||||
[Desc("Damage percentage at each range step")]
|
||||
public readonly int[] Falloff = { 100, 37, 14, 5, 0 };
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace OpenRA.Mods.Common.Warheads
|
||||
public abstract class Warhead : IWarhead
|
||||
{
|
||||
[Desc("What types of targets are affected.")]
|
||||
public readonly BitSet<TargetableType> ValidTargets = new BitSet<TargetableType>("Ground", "Water");
|
||||
public readonly BitSet<TargetableType> ValidTargets = new("Ground", "Water");
|
||||
|
||||
[Desc("What types of targets are unaffected.", "Overrules ValidTargets.")]
|
||||
public readonly BitSet<TargetableType> InvalidTargets;
|
||||
@@ -39,7 +39,7 @@ namespace OpenRA.Mods.Common.Warheads
|
||||
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);
|
||||
public readonly WDist AirThreshold = new(128);
|
||||
|
||||
[Desc("Delay in ticks before applying the warhead effect.", "0 = instant (old model).")]
|
||||
public readonly int Delay = 0;
|
||||
|
||||
Reference in New Issue
Block a user