Fix IDE0090
This commit is contained in:
committed by
Pavel Penev
parent
164abfdae1
commit
8a285f9b19
@@ -22,7 +22,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
public readonly string TerrainType = "Jumpjet";
|
||||
|
||||
[Desc("Height offset relative to the smoothed terrain for movement.")]
|
||||
public readonly WDist HeightOffset = new WDist(3992);
|
||||
public readonly WDist HeightOffset = new(3992);
|
||||
|
||||
[Desc("Cell radius for smoothing adjacent cell heights.")]
|
||||
public readonly int SmoothingRadius = 2;
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
public readonly short JumpjetTransitionCost = 0;
|
||||
|
||||
[Desc("The terrain types that this actor can transition on. Leave empty to allow any.")]
|
||||
public readonly HashSet<string> JumpjetTransitionTerrainTypes = new HashSet<string>();
|
||||
public readonly HashSet<string> JumpjetTransitionTerrainTypes = new();
|
||||
|
||||
[Desc("Can this actor transition on slopes?")]
|
||||
public readonly bool JumpjetTransitionOnRamps = true;
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
|
||||
[ActorReference]
|
||||
[Desc("Actor types that should be treated as veins for adjacency.")]
|
||||
public readonly HashSet<string> VeinholeActors = new HashSet<string> { };
|
||||
public readonly HashSet<string> VeinholeActors = new() { };
|
||||
|
||||
public override object Create(ActorInitializer init) { return new TSEditorResourceLayer(init.Self, this); }
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
|
||||
[ActorReference]
|
||||
[Desc("Actor types that should be treated as veins for adjacency.")]
|
||||
public readonly HashSet<string> VeinholeActors = new HashSet<string> { };
|
||||
public readonly HashSet<string> VeinholeActors = new() { };
|
||||
|
||||
public override object Create(ActorInitializer init) { return new TSResourceLayer(init.Self, this); }
|
||||
}
|
||||
@@ -33,7 +33,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
class TSResourceLayer : ResourceLayer, INotifyActorDisposing
|
||||
{
|
||||
readonly TSResourceLayerInfo info;
|
||||
readonly HashSet<CPos> veinholeCells = new HashSet<CPos>();
|
||||
readonly HashSet<CPos> veinholeCells = new();
|
||||
|
||||
public TSResourceLayer(Actor self, TSResourceLayerInfo info)
|
||||
: base(self, info)
|
||||
|
||||
@@ -22,16 +22,16 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
public class TSTiberiumRendererInfo : ResourceRendererInfo
|
||||
{
|
||||
[Desc("Sequences to use for ramp type 1.", "Dictionary of [resource type]: [list of sequences].")]
|
||||
public readonly Dictionary<string, string[]> Ramp1Sequences = new Dictionary<string, string[]>();
|
||||
public readonly Dictionary<string, string[]> Ramp1Sequences = new();
|
||||
|
||||
[Desc("Sequences to use for ramp type 2.", "Dictionary of [resource type]: [list of sequences].")]
|
||||
public readonly Dictionary<string, string[]> Ramp2Sequences = new Dictionary<string, string[]>();
|
||||
public readonly Dictionary<string, string[]> Ramp2Sequences = new();
|
||||
|
||||
[Desc("Sequences to use for ramp type 3.", "Dictionary of [resource type]: [list of sequences].")]
|
||||
public readonly Dictionary<string, string[]> Ramp3Sequences = new Dictionary<string, string[]>();
|
||||
public readonly Dictionary<string, string[]> Ramp3Sequences = new();
|
||||
|
||||
[Desc("Sequences to use for ramp type 4.", "Dictionary of [resource type]: [list of sequences].")]
|
||||
public readonly Dictionary<string, string[]> Ramp4Sequences = new Dictionary<string, string[]>();
|
||||
public readonly Dictionary<string, string[]> Ramp4Sequences = new();
|
||||
|
||||
public override object Create(ActorInitializer init) { return new TSTiberiumRenderer(init.Self, this); }
|
||||
}
|
||||
@@ -40,10 +40,10 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
{
|
||||
readonly TSTiberiumRendererInfo info;
|
||||
readonly World world;
|
||||
readonly Dictionary<string, Dictionary<string, ISpriteSequence>> ramp1Variants = new Dictionary<string, Dictionary<string, ISpriteSequence>>();
|
||||
readonly Dictionary<string, Dictionary<string, ISpriteSequence>> ramp2Variants = new Dictionary<string, Dictionary<string, ISpriteSequence>>();
|
||||
readonly Dictionary<string, Dictionary<string, ISpriteSequence>> ramp3Variants = new Dictionary<string, Dictionary<string, ISpriteSequence>>();
|
||||
readonly Dictionary<string, Dictionary<string, ISpriteSequence>> ramp4Variants = new Dictionary<string, Dictionary<string, ISpriteSequence>>();
|
||||
readonly Dictionary<string, Dictionary<string, ISpriteSequence>> ramp1Variants = new();
|
||||
readonly Dictionary<string, Dictionary<string, ISpriteSequence>> ramp2Variants = new();
|
||||
readonly Dictionary<string, Dictionary<string, ISpriteSequence>> ramp3Variants = new();
|
||||
readonly Dictionary<string, Dictionary<string, ISpriteSequence>> ramp4Variants = new();
|
||||
|
||||
public TSTiberiumRenderer(Actor self, TSTiberiumRendererInfo info)
|
||||
: base(self, info)
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
|
||||
[ActorReference]
|
||||
[Desc("Actor types that should be treated as veins for adjacency.")]
|
||||
public readonly HashSet<string> VeinholeActors = new HashSet<string> { };
|
||||
public readonly HashSet<string> VeinholeActors = new() { };
|
||||
|
||||
void IMapPreviewSignatureInfo.PopulateMapPreviewSignatureCells(Map map, ActorInfo ai, ActorReference s, List<(MPos, Color)> destinationBuffer)
|
||||
{
|
||||
@@ -120,7 +120,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
PlusY = 0x8,
|
||||
}
|
||||
|
||||
static readonly Dictionary<Adjacency, int[]> BorderIndices = new Dictionary<Adjacency, int[]>()
|
||||
static readonly Dictionary<Adjacency, int[]> BorderIndices = new()
|
||||
{
|
||||
{ Adjacency.MinusY, new[] { 3, 4, 5 } },
|
||||
{ Adjacency.PlusX, new[] { 6, 7, 8 } },
|
||||
@@ -151,9 +151,9 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
readonly IResourceLayer resourceLayer;
|
||||
readonly CellLayer<int[]> renderIndices;
|
||||
readonly CellLayer<Adjacency> borders;
|
||||
readonly HashSet<CPos> dirty = new HashSet<CPos>();
|
||||
readonly Queue<CPos> cleanDirty = new Queue<CPos>();
|
||||
readonly HashSet<CPos> veinholeCells = new HashSet<CPos>();
|
||||
readonly HashSet<CPos> dirty = new();
|
||||
readonly Queue<CPos> cleanDirty = new();
|
||||
readonly HashSet<CPos> veinholeCells = new();
|
||||
readonly int maxDensity;
|
||||
readonly Color veinRadarColor;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user