Change constructOrderCache to an array.

This commit is contained in:
RoosterDragon
2024-09-14 18:03:38 +01:00
committed by Gustas
parent a9e5744a37
commit 7775b42b59

View File

@@ -33,7 +33,7 @@ namespace OpenRA
/// </summary>
public readonly string Name;
readonly TypeDictionary traits = new();
List<TraitInfo> constructOrderCache = null;
TraitInfo[] constructOrderCache = null;
public ActorInfo(ObjectCreator creator, string name, MiniYaml node)
{
@@ -162,7 +162,7 @@ namespace OpenRA
throw new YamlException(exceptionString);
}
constructOrderCache = resolved.ConvertAll(r => r.Trait);
constructOrderCache = resolved.Select(r => r.Trait).ToArray();
return constructOrderCache;
}