Fix IDE0090

This commit is contained in:
RoosterDragon
2023-04-05 19:34:12 +01:00
committed by Pavel Penev
parent 164abfdae1
commit 8a285f9b19
385 changed files with 790 additions and 794 deletions

View File

@@ -34,13 +34,13 @@ namespace OpenRA.Mods.Common.Projectiles
public readonly int DamageInterval = 3;
[Desc("The width of the beam.")]
public readonly WDist Width = new WDist(512);
public readonly WDist Width = new(512);
[Desc("The shape of the beam. Accepts values Cylindrical or Flat.")]
public readonly BeamRenderableShape Shape = BeamRenderableShape.Cylindrical;
[Desc("How far beyond the target the projectile keeps on travelling.")]
public readonly WDist BeyondTargetRange = new WDist(0);
public readonly WDist BeyondTargetRange = new(0);
[Desc("The minimum distance the beam travels.")]
public readonly WDist MinDistance = WDist.Zero;

View File

@@ -77,7 +77,7 @@ namespace OpenRA.Mods.Common.Projectiles
public readonly bool Blockable = true;
[Desc("Width of projectile (used for finding blocking actors).")]
public readonly WDist Width = new WDist(1);
public readonly WDist Width = new(1);
[Desc("Arc in WAngles, two values indicate variable arc.")]
public readonly WAngle[] LaunchAngle = { WAngle.Zero };
@@ -93,7 +93,7 @@ namespace OpenRA.Mods.Common.Projectiles
public readonly string BounceSound = null;
[Desc("Terrain where the projectile explodes instead of bouncing.")]
public readonly HashSet<string> InvalidBounceTerrain = new HashSet<string>();
public readonly HashSet<string> InvalidBounceTerrain = new();
[Desc("Trigger the explosion if the projectile touches an actor thats owner has these player relationships.")]
public readonly PlayerRelationship ValidBounceBlockerRelationships = PlayerRelationship.Enemy | PlayerRelationship.Neutral;
@@ -111,7 +111,7 @@ namespace OpenRA.Mods.Common.Projectiles
public readonly int ContrailZOffset = 2047;
[Desc("Thickness of the emitted line.")]
public readonly WDist ContrailWidth = new WDist(64);
public readonly WDist ContrailWidth = new(64);
[Desc("RGB color at the contrail start.")]
public readonly Color ContrailStartColor = Color.White;

View File

@@ -47,7 +47,7 @@ namespace OpenRA.Mods.Common.Projectiles
public readonly WVec Velocity = WVec.Zero;
[Desc("Value added to Velocity every tick.")]
public readonly WVec Acceleration = new WVec(0, 0, -15);
public readonly WVec Acceleration = new(0, 0, -15);
public IProjectile Create(ProjectileArgs args) { return new GravityBomb(this, args); }
}

View File

@@ -31,11 +31,11 @@ namespace OpenRA.Mods.Common.Projectiles
public readonly bool Blockable = false;
[Desc("The width of the projectile.")]
public readonly WDist Width = new WDist(1);
public readonly WDist Width = new(1);
[Desc("Scan radius for actors with projectile-blocking trait. If set to a negative value (default), it will automatically scale",
"to the blocker with the largest health shape. Only set custom values if you know what you're doing.")]
public readonly WDist BlockerScanRadius = new WDist(-1);
public readonly WDist BlockerScanRadius = new(-1);
public IProjectile Create(ProjectileArgs args) { return new InstantHit(this, args); }
}

View File

@@ -24,7 +24,7 @@ namespace OpenRA.Mods.Common.Projectiles
public class LaserZapInfo : IProjectileInfo
{
[Desc("The width of the zap.")]
public readonly WDist Width = new WDist(86);
public readonly WDist Width = new(86);
[Desc("The shape of the beam. Accepts values Cylindrical or Flat.")]
public readonly BeamRenderableShape Shape = BeamRenderableShape.Cylindrical;
@@ -62,7 +62,7 @@ namespace OpenRA.Mods.Common.Projectiles
public readonly bool SecondaryBeam = false;
[Desc("The width of the zap.")]
public readonly WDist SecondaryBeamWidth = new WDist(86);
public readonly WDist SecondaryBeamWidth = new(86);
[Desc("The shape of the beam. Accepts values Cylindrical or Flat.")]
public readonly BeamRenderableShape SecondaryBeamShape = BeamRenderableShape.Cylindrical;

View File

@@ -45,22 +45,22 @@ namespace OpenRA.Mods.Common.Projectiles
public readonly Color ShadowColor = Color.FromArgb(140, 0, 0, 0);
[Desc("Minimum vertical launch angle (pitch).")]
public readonly WAngle MinimumLaunchAngle = new WAngle(-64);
public readonly WAngle MinimumLaunchAngle = new(-64);
[Desc("Maximum vertical launch angle (pitch).")]
public readonly WAngle MaximumLaunchAngle = new WAngle(128);
public readonly WAngle MaximumLaunchAngle = new(128);
[Desc("Minimum launch speed in WDist / tick. Defaults to Speed if -1.")]
public readonly WDist MinimumLaunchSpeed = new WDist(-1);
public readonly WDist MinimumLaunchSpeed = new(-1);
[Desc("Maximum launch speed in WDist / tick. Defaults to Speed if -1.")]
public readonly WDist MaximumLaunchSpeed = new WDist(-1);
public readonly WDist MaximumLaunchSpeed = new(-1);
[Desc("Maximum projectile speed in WDist / tick")]
public readonly WDist Speed = new WDist(384);
public readonly WDist Speed = new(384);
[Desc("Projectile acceleration when propulsion activated.")]
public readonly WDist Acceleration = new WDist(5);
public readonly WDist Acceleration = new(5);
[Desc("How many ticks before this missile is armed and can explode.")]
public readonly int Arm = 0;
@@ -72,7 +72,7 @@ namespace OpenRA.Mods.Common.Projectiles
public readonly bool TerrainHeightAware = false;
[Desc("Width of projectile (used for finding blocking actors).")]
public readonly WDist Width = new WDist(1);
public readonly WDist Width = new(1);
[Desc("The maximum/constant/incremental inaccuracy used in conjunction with the InaccuracyType property.")]
public readonly WDist Inaccuracy = WDist.Zero;
@@ -81,16 +81,16 @@ namespace OpenRA.Mods.Common.Projectiles
public readonly InaccuracyType InaccuracyType = InaccuracyType.Absolute;
[Desc("Inaccuracy override when successfully locked onto target. Defaults to Inaccuracy if negative.")]
public readonly WDist LockOnInaccuracy = new WDist(-1);
public readonly WDist LockOnInaccuracy = new(-1);
[Desc("Probability of locking onto and following target.")]
public readonly int LockOnProbability = 100;
[Desc("Horizontal rate of turn.")]
public readonly WAngle HorizontalRateOfTurn = new WAngle(20);
public readonly WAngle HorizontalRateOfTurn = new(20);
[Desc("Vertical rate of turn.")]
public readonly WAngle VerticalRateOfTurn = new WAngle(24);
public readonly WAngle VerticalRateOfTurn = new(24);
[Desc("Gravity applied while in free fall.")]
public readonly int Gravity = 10;
@@ -105,7 +105,7 @@ namespace OpenRA.Mods.Common.Projectiles
public readonly WDist AirburstAltitude = WDist.Zero;
[Desc("Cruise altitude. Zero means no cruise altitude used.")]
public readonly WDist CruiseAltitude = new WDist(512);
public readonly WDist CruiseAltitude = new(512);
[Desc("Activate homing mechanism after this many ticks.")]
public readonly int HomingActivationDelay = 0;
@@ -140,7 +140,7 @@ namespace OpenRA.Mods.Common.Projectiles
public readonly int ContrailZOffset = 2047;
[Desc("Thickness of the emitted line.")]
public readonly WDist ContrailWidth = new WDist(64);
public readonly WDist ContrailWidth = new(64);
[Desc("RGB color at the contrail start.")]
public readonly Color ContrailStartColor = Color.White;
@@ -176,7 +176,7 @@ namespace OpenRA.Mods.Common.Projectiles
[Desc("Explodes when inside this proximity radius to target.",
"Note: If this value is lower than the missile speed, this check might",
"not trigger fast enough, causing the missile to fly past the target.")]
public readonly WDist CloseEnough = new WDist(298);
public readonly WDist CloseEnough = new(298);
public IProjectile Create(ProjectileArgs args) { return new Missile(this, args); }
}

View File

@@ -41,7 +41,7 @@ namespace OpenRA.Mods.Common.Projectiles
public readonly int ZOffset = 0;
[Desc("The width of the main trajectory. (\"beam\").")]
public readonly WDist BeamWidth = new WDist(86);
public readonly WDist BeamWidth = new(86);
[Desc("The shape of the beam. Accepts values Cylindrical or Flat.")]
public readonly BeamRenderableShape BeamShape = BeamRenderableShape.Cylindrical;
@@ -57,13 +57,13 @@ namespace OpenRA.Mods.Common.Projectiles
public readonly int BeamAlphaDeltaPerTick = -8;
[Desc("Thickness of the helix")]
public readonly WDist HelixThickness = new WDist(32);
public readonly WDist HelixThickness = new(32);
[Desc("The radius of the spiral effect. (WDist)")]
public readonly WDist HelixRadius = new WDist(64);
public readonly WDist HelixRadius = new(64);
[Desc("Height of one complete helix turn, measured parallel to the axis of the helix (WDist)")]
public readonly WDist HelixPitch = new WDist(512);
public readonly WDist HelixPitch = new(512);
[Desc("Helix radius gets + this value per tick during drawing")]
public readonly int HelixRadiusDeltaPerTick = 8;
@@ -72,7 +72,7 @@ namespace OpenRA.Mods.Common.Projectiles
public readonly int HelixAlphaDeltaPerTick = -8;
[Desc("Helix spins by this much over time each tick.")]
public readonly WAngle HelixAngleDeltaPerTick = new WAngle(16);
public readonly WAngle HelixAngleDeltaPerTick = new(16);
[Desc("Draw each cycle of helix with this many quantization steps")]
public readonly int QuantizationCount = 16;