Fix IDE0028, IDE0300, IDE0301, IDE0302, IDE0303, IDE0304.

Silence IDE0305.
This commit is contained in:
RoosterDragon
2025-03-03 17:29:45 +00:00
committed by Pavel Penev
parent 0740991c12
commit 79454d8fd2
559 changed files with 1661 additions and 1751 deletions

View File

@@ -206,12 +206,12 @@ namespace OpenRA.Mods.Common.Graphics
protected static readonly SpriteSequenceField<float2> DepthSpriteOffset = new(nameof(DepthSpriteOffset), float2.Zero);
protected static readonly MiniYaml NoData = new(null);
protected static readonly int[] FirstFrame = { 0 };
protected static readonly int[] FirstFrame = [0];
protected readonly ISpriteSequenceLoader Loader;
protected string image;
protected List<SpriteReservation> spritesToLoad = new();
protected List<SpriteReservation> spritesToLoad = [];
protected Sprite[] sprites;
protected Sprite[] shadowSprites;
protected bool reverseFacings;
@@ -354,7 +354,7 @@ namespace OpenRA.Mods.Common.Graphics
var filename = LoadField(Filename, data, defaults, out var location);
var loadFrames = CalculateFrameIndices(start, length, stride ?? length ?? 0, facings, frames, transpose, reverseFacings, shadowStart);
return new[] { new ReservationInfo(filename, loadFrames, frames, location) };
return [new ReservationInfo(filename, loadFrames, frames, location)];
}
protected virtual IEnumerable<ReservationInfo> ParseCombineFilenames(ModData modData, string tileset, int[] frames, MiniYaml data)
@@ -403,7 +403,7 @@ namespace OpenRA.Mods.Common.Graphics
var depthSprite = LoadField(DepthSprite, data, defaults, out var depthSpriteLocation);
if (!string.IsNullOrEmpty(depthSprite))
depthSpriteReservation = cache.ReserveSprites(depthSprite, new[] { LoadField(DepthSpriteFrame, data, defaults) }, depthSpriteLocation);
depthSpriteReservation = cache.ReserveSprites(depthSprite, [LoadField(DepthSpriteFrame, data, defaults)], depthSpriteLocation);
depthSpriteOffset = LoadField(DepthSpriteOffset, data, defaults);