Remove our own impl of ReadOnlyList and update usages

This commit is contained in:
teinarss
2021-03-16 20:08:18 +01:00
committed by reaperrr
parent e12ff2c59d
commit 8b0a3ea680
17 changed files with 20 additions and 114 deletions

View File

@@ -67,7 +67,7 @@ namespace OpenRA.Mods.Common.Traits
public readonly MissionObjectivesInfo Info;
readonly List<MissionObjective> objectives = new List<MissionObjective>();
readonly Player player;
public ReadOnlyList<MissionObjective> Objectives;
public IReadOnlyList<MissionObjective> Objectives => objectives;
Player[] enemies;
Player[] allies;
@@ -92,7 +92,6 @@ namespace OpenRA.Mods.Common.Traits
{
Info = info;
this.player = player;
Objectives = new ReadOnlyList<MissionObjective>(objectives);
}
void IWorldLoaded.WorldLoaded(World w, WorldRenderer wr)