Change classes that use FieldLoader to use read-only collections.

This commit is contained in:
RoosterDragon
2025-11-08 12:40:56 +00:00
committed by Paul Chote
parent 797c71e500
commit 649e7e8c28
308 changed files with 1233 additions and 901 deletions

View File

@@ -10,7 +10,9 @@
#endregion
using System;
using System.Collections.Frozen;
using System.Collections.Generic;
using System.Collections.Immutable;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Graphics;
using OpenRA.Traits;
@@ -21,10 +23,10 @@ namespace OpenRA.Mods.Common.Traits.Render
sealed class WithCrateBodyInfo : TraitInfo, Requires<RenderSpritesInfo>, IRenderActorPreviewSpritesInfo
{
[Desc("Easteregg sequences to use in December.")]
public readonly string[] XmasImages = [];
public readonly ImmutableArray<string> XmasImages = [];
[Desc("Terrain types on which to display WaterSequence.")]
public readonly HashSet<string> WaterTerrainTypes = ["Water"];
public readonly FrozenSet<string> WaterTerrainTypes = new HashSet<string> { "Water" }.ToFrozenSet();
[SequenceReference]
public readonly string IdleSequence = "idle";