Fix IDE0028, IDE0300, IDE0301, IDE0302, IDE0303, IDE0304.
Silence IDE0305.
This commit is contained in:
committed by
Pavel Penev
parent
0740991c12
commit
79454d8fd2
@@ -20,7 +20,7 @@ namespace OpenRA.Mods.D2k.Traits
|
||||
public readonly int Intensity = 0;
|
||||
|
||||
[Desc("Noise percentage at Range step away from the actor.")]
|
||||
public readonly int[] Falloff = { 100, 100, 25, 11, 6, 4, 3, 2, 1, 0 };
|
||||
public readonly int[] Falloff = [100, 100, 25, 11, 6, 4, 3, 2, 1, 0];
|
||||
|
||||
[Desc("Range between falloff steps.")]
|
||||
public readonly WDist Spread = new(3072);
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Graphics;
|
||||
@@ -24,10 +23,10 @@ namespace OpenRA.Mods.D2k.Traits
|
||||
public class D2kActorPreviewPlaceBuildingPreviewInfo : ActorPreviewPlaceBuildingPreviewInfo
|
||||
{
|
||||
[Desc("Terrain types that should show the 'unsafe' footprint tile.")]
|
||||
public readonly HashSet<string> UnsafeTerrainTypes = new() { "Rock" };
|
||||
public readonly HashSet<string> UnsafeTerrainTypes = ["Rock"];
|
||||
|
||||
[Desc("Only check for 'unsafe' footprint tiles when you have these prerequisites.")]
|
||||
public readonly string[] RequiresPrerequisites = Array.Empty<string>();
|
||||
public readonly string[] RequiresPrerequisites = [];
|
||||
|
||||
[Desc("Sprite image to use for the overlay.")]
|
||||
public readonly string Image = "overlay";
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace OpenRA.Mods.D2k.Traits.Buildings
|
||||
public readonly BitSet<DamageType> DamageTypes = default;
|
||||
|
||||
[Desc("Terrain types where the actor will take damage.")]
|
||||
public readonly string[] DamageTerrainTypes = { "Rock" };
|
||||
public readonly string[] DamageTerrainTypes = ["Rock"];
|
||||
|
||||
[Desc("Percentage health below which the actor will not receive further damage.")]
|
||||
public readonly int DamageThreshold = 50;
|
||||
@@ -44,7 +44,7 @@ namespace OpenRA.Mods.D2k.Traits.Buildings
|
||||
public readonly ushort ConcreteTemplate = 88;
|
||||
|
||||
[Desc("List of required prerequisites to place a terrain template.")]
|
||||
public readonly string[] ConcretePrerequisites = Array.Empty<string>();
|
||||
public readonly string[] ConcretePrerequisites = [];
|
||||
|
||||
public override object Create(ActorInitializer init) { return new D2kBuilding(init, this); }
|
||||
}
|
||||
|
||||
@@ -25,28 +25,28 @@ namespace OpenRA.Mods.D2k.Traits
|
||||
public class SpiceBloomInfo : TraitInfo, IRenderActorPreviewSpritesInfo, Requires<RenderSpritesInfo>
|
||||
{
|
||||
[SequenceReference]
|
||||
public readonly string[] GrowthSequences = { "grow1", "grow2", "grow3" };
|
||||
public readonly string[] GrowthSequences = ["grow1", "grow2", "grow3"];
|
||||
|
||||
[SequenceReference]
|
||||
public readonly string SpurtSequence = "spurt";
|
||||
|
||||
[Desc("The range of time (in ticks) that the spicebloom will take to grow until it blows up.")]
|
||||
public readonly int[] Lifetime = { 2000, 3000 };
|
||||
public readonly int[] Lifetime = [2000, 3000];
|
||||
|
||||
public readonly string ResourceType = "Spice";
|
||||
|
||||
[Desc("Spice blooms only grow on these terrain types.")]
|
||||
public readonly HashSet<string> GrowthTerrainTypes = new();
|
||||
public readonly HashSet<string> GrowthTerrainTypes = [];
|
||||
|
||||
[Desc("The weapon to use for spice creation.")]
|
||||
[WeaponReference]
|
||||
public readonly string Weapon = null;
|
||||
|
||||
[Desc("The number of times to fire Weapon at the minimum and maximum actor age.")]
|
||||
public readonly int[] Bursts = { 4, 12 };
|
||||
public readonly int[] Bursts = [4, 12];
|
||||
|
||||
[Desc("The minimum and maximum distance in cells that spice may be expelled.")]
|
||||
public readonly int[] Range = { 3, 5 };
|
||||
public readonly int[] Range = [3, 5];
|
||||
|
||||
[Desc("Delay between each burst. (in Ticks)")]
|
||||
public readonly int BurstInterval = 1;
|
||||
@@ -167,7 +167,7 @@ namespace OpenRA.Mods.D2k.Traits
|
||||
|
||||
public class FireProjectilesEffect : IEffect
|
||||
{
|
||||
readonly Stack<ProjectileArgs> projectiles = new();
|
||||
readonly Stack<ProjectileArgs> projectiles = [];
|
||||
int delay = 1;
|
||||
readonly int delayInfo = 1;
|
||||
public FireProjectilesEffect(Stack<ProjectileArgs> projectiles, int delayInfo)
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace OpenRA.Mods.D2k.Traits
|
||||
public class BuildableTerrainLayer : IRenderOverlay, IWorldLoaded, ITickRender, IRadarTerrainLayer, INotifyActorDisposing
|
||||
{
|
||||
readonly BuildableTerrainLayerInfo info;
|
||||
readonly Dictionary<CPos, TerrainTile?> dirty = new();
|
||||
readonly Dictionary<CPos, TerrainTile?> dirty = [];
|
||||
readonly ITiledTerrainRenderer terrainRenderer;
|
||||
readonly World world;
|
||||
readonly CellLayer<int> strength;
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace OpenRA.Mods.D2k.Traits
|
||||
readonly Renderer renderer;
|
||||
readonly IShader shader;
|
||||
readonly IVertexBuffer<RenderPostProcessPassTexturedVertex> buffer;
|
||||
readonly List<float3> positions = new();
|
||||
readonly List<float3> positions = [];
|
||||
|
||||
public SonicBlastRenderer(SonicBlastRendererInfo info)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user