Remove our own ReadOnlyDictionary and update usages

This commit is contained in:
teinarss
2021-03-16 20:03:38 +01:00
committed by reaperrr
parent afbdb395b2
commit e12ff2c59d
44 changed files with 73 additions and 142 deletions

View File

@@ -11,6 +11,7 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using OpenRA.FileSystem;

View File

@@ -9,6 +9,7 @@
*/
#endregion
using System.Collections.Generic;
using OpenRA.Graphics;
using OpenRA.Primitives;
using OpenRA.Traits;

View File

@@ -10,6 +10,7 @@
#endregion
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using OpenRA.Activities;
using OpenRA.Mods.Common;
@@ -42,7 +43,7 @@ namespace OpenRA.Mods.Cnc.Traits
public IReadOnlyDictionary<CPos, SubCell> OccupiedCells(ActorInfo info, CPos location, SubCell subCell = SubCell.Any)
{
var occupied = new Dictionary<CPos, SubCell>() { { location, SubCell.FullCell } };
return new ReadOnlyDictionary<CPos, SubCell>(occupied);
return occupied;
}
bool IOccupySpaceInfo.SharesCell => false;