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

@@ -52,7 +52,7 @@ namespace OpenRA.Graphics
public readonly Dictionary<string, Rectangle> Regions = new Dictionary<string, Rectangle>();
}
public static IReadOnlyDictionary<string, Collection> Collections { get; private set; }
public static IReadOnlyDictionary<string, Collection> Collections => collections;
static Dictionary<string, Collection> collections;
static Dictionary<string, (Sheet Sheet, int Density)> cachedSheets;
static Dictionary<string, Dictionary<string, Sprite>> cachedSprites;
@@ -77,8 +77,6 @@ namespace OpenRA.Graphics
cachedPanelSprites = new Dictionary<string, Sprite[]>();
cachedCollectionSheets = new Dictionary<Collection, (Sheet, int)>();
Collections = new ReadOnlyDictionary<string, Collection>(collections);
var chrome = MiniYaml.Merge(modData.Manifest.Chrome
.Select(s => MiniYaml.FromStream(fileSystem.Open(s), s)));