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

@@ -23,7 +23,7 @@ namespace OpenRA.Mods.D2k.Traits
public readonly int[] Falloff = { 100, 100, 25, 11, 6, 4, 3, 2, 1, 0 };
[Desc("Range between falloff steps.")]
public readonly WDist Spread = new WDist(3072);
public readonly WDist Spread = new(3072);
[Desc("Ranges at which each Falloff step is defined. Overrides Spread.")]
public readonly WDist[] Range = null;

View File

@@ -25,7 +25,7 @@ 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 HashSet<string> { "Rock" };
public readonly HashSet<string> UnsafeTerrainTypes = new() { "Rock" };
[Desc("Only check for 'unsafe' footprint tiles when you have these prerequisites.")]
public readonly string[] RequiresPrerequisites = Array.Empty<string>();

View File

@@ -35,7 +35,7 @@ namespace OpenRA.Mods.D2k.Traits
public readonly string ResourceType = "Spice";
[Desc("Spice blooms only grow on these terrain types.")]
public readonly HashSet<string> GrowthTerrainTypes = new HashSet<string>();
public readonly HashSet<string> GrowthTerrainTypes = new();
[Desc("The weapon to use for spice creation.")]
[WeaponReference]

View File

@@ -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 Dictionary<CPos, TerrainTile?>();
readonly Dictionary<CPos, TerrainTile?> dirty = new();
readonly ITiledTerrainRenderer terrainRenderer;
readonly World world;
readonly CellLayer<int> strength;

View File

@@ -42,7 +42,7 @@ namespace OpenRA.Mods.D2k.Traits
All = 0xFF
}
public static readonly Dictionary<ClearSides, int> SpriteMap = new Dictionary<ClearSides, int>()
public static readonly Dictionary<ClearSides, int> SpriteMap = new()
{
{ ClearSides.Left | ClearSides.Top | ClearSides.TopLeft | ClearSides.TopRight | ClearSides.BottomLeft | ClearSides.BottomRight, 2 },
{ ClearSides.Top | ClearSides.Right | ClearSides.TopLeft | ClearSides.TopRight | ClearSides.BottomLeft | ClearSides.BottomRight, 3 },