Change classes that use FieldLoader to use read-only collections.
This commit is contained in:
committed by
Paul Chote
parent
797c71e500
commit
649e7e8c28
@@ -9,7 +9,8 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Frozen;
|
||||
using System.Collections.Immutable;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
@@ -26,7 +27,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public readonly string ClassName = "Unlabeled";
|
||||
|
||||
[Desc("Only available when selecting one of these factions.", "Leave empty for no restrictions.")]
|
||||
public readonly HashSet<string> Factions = [];
|
||||
public readonly FrozenSet<string> Factions = FrozenSet<string>.Empty;
|
||||
|
||||
[Desc("The actor at the center, usually the mobile construction vehicle.")]
|
||||
[ActorReference]
|
||||
@@ -37,7 +38,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
[Desc("A group of units ready to defend or scout.")]
|
||||
[ActorReference]
|
||||
public readonly string[] SupportActors = [];
|
||||
public readonly ImmutableArray<string> SupportActors = [];
|
||||
|
||||
[Desc("Inner radius for spawning support actors")]
|
||||
public readonly int InnerSupportRadius = 2;
|
||||
|
||||
Reference in New Issue
Block a user