Fix IDE0090
This commit is contained in:
committed by
Pavel Penev
parent
164abfdae1
commit
8a285f9b19
@@ -37,7 +37,7 @@ namespace OpenRA.Mods.D2k.PackageLoaders
|
||||
public IEnumerable<string> Contents => index.Keys;
|
||||
|
||||
readonly Stream s;
|
||||
readonly Dictionary<string, Entry> index = new Dictionary<string, Entry>();
|
||||
readonly Dictionary<string, Entry> index = new();
|
||||
|
||||
public D2kSoundResources(Stream s, string filename)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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>();
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 },
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace OpenRA.Mods.D2k.UtilityCommands
|
||||
|
||||
// PlayerReference colors in D2k missions only affect chat text and minimap colors because actors use specific palette colors.
|
||||
// So using the colors from the original game's minimap.
|
||||
public static Dictionary<string, (string Faction, Color Color)> PlayerReferenceDataByPlayerName = new Dictionary<string, (string, Color)>
|
||||
public static Dictionary<string, (string Faction, Color Color)> PlayerReferenceDataByPlayerName = new()
|
||||
{
|
||||
{ "Neutral", ("Random", Color.White) },
|
||||
{ "Atreides", ("atreides", Color.FromArgb(90, 115, 148)) },
|
||||
@@ -36,7 +36,7 @@ namespace OpenRA.Mods.D2k.UtilityCommands
|
||||
{ "Mercenaries", ("mercenary", Color.FromArgb(156, 132, 8)) }
|
||||
};
|
||||
|
||||
public static Dictionary<int, (string Actor, string Owner)> ActorDataByActorCode = new Dictionary<int, (string, string)>
|
||||
public static Dictionary<int, (string Actor, string Owner)> ActorDataByActorCode = new()
|
||||
{
|
||||
{ 20, ("wormspawner", "Creeps") },
|
||||
{ 23, ("mpspawn", "Neutral") },
|
||||
|
||||
Reference in New Issue
Block a user