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

@@ -29,14 +29,14 @@ namespace OpenRA
public sealed class World : IDisposable
{
internal readonly TraitDictionary TraitDict = new();
readonly SortedDictionary<uint, Actor> actors = new();
readonly List<IEffect> effects = new();
readonly List<IEffect> unpartitionedEffects = new();
readonly List<ISync> syncedEffects = new();
readonly SortedDictionary<uint, Actor> actors = [];
readonly List<IEffect> effects = [];
readonly List<IEffect> unpartitionedEffects = [];
readonly List<ISync> syncedEffects = [];
readonly GameSettings gameSettings;
readonly ModData modData;
readonly Queue<Action<World>> frameEndActions = new();
readonly Queue<Action<World>> frameEndActions = [];
public readonly GameSpeed GameSpeed;
@@ -52,7 +52,7 @@ namespace OpenRA
public LongBitSet<PlayerBitMask> AllPlayersMask = default;
public readonly LongBitSet<PlayerBitMask> NoPlayersMask = default;
public Player[] Players = Array.Empty<Player>();
public Player[] Players = [];
public event Action<Player> RenderPlayerChanged;
@@ -213,7 +213,7 @@ namespace OpenRA
LocalRandom = new MersenneTwister();
var worldActorType = type == WorldType.Editor ? SystemActors.EditorWorld : SystemActors.World;
WorldActor = CreateActor(worldActorType.ToString(), new TypeDictionary());
WorldActor = CreateActor(worldActorType.ToString(), []);
ActorMap = WorldActor.Trait<IActorMap>();
ScreenMap = WorldActor.Trait<ScreenMap>();
Selection = WorldActor.Trait<ISelection>();
@@ -399,7 +399,7 @@ namespace OpenRA
public int WorldTick { get; private set; }
readonly Dictionary<int, MiniYaml> gameSaveTraitData = new();
readonly Dictionary<int, MiniYaml> gameSaveTraitData = [];
internal void AddGameSaveTraitData(int traitIndex, MiniYaml yaml)
{
gameSaveTraitData[traitIndex] = yaml;