From e5309ee586979ba74a87b3b8efa92dba27be2a1d Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 15 Feb 2020 11:51:49 +0000 Subject: [PATCH] Remove unused InstalledMods.Icons cache. --- OpenRA.Game/InstalledMods.cs | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/OpenRA.Game/InstalledMods.cs b/OpenRA.Game/InstalledMods.cs index c439be16a8..6d8e6e38b5 100644 --- a/OpenRA.Game/InstalledMods.cs +++ b/OpenRA.Game/InstalledMods.cs @@ -26,16 +26,12 @@ namespace OpenRA readonly Dictionary mods; readonly SheetBuilder sheetBuilder; - readonly Dictionary icons = new Dictionary(); - public readonly IReadOnlyDictionary Icons; - /// Initializes the collection of locally installed mods. /// Filesystem paths to search for mod packages. /// Filesystem paths to additional mod packages. public InstalledMods(IEnumerable searchPaths, IEnumerable explicitPaths) { sheetBuilder = new SheetBuilder(SheetType.BGRA, 256); - Icons = new ReadOnlyDictionary(icons); mods = GetInstalledMods(searchPaths, explicitPaths); } @@ -76,20 +72,7 @@ namespace OpenRA package = new Folder(path); if (package.Contains("mod.yaml")) - { - var manifest = new Manifest(id, package); - - if (package.Contains("icon.png")) - { - using (var stream = package.GetStream("icon.png")) - if (stream != null) - icons[id] = sheetBuilder.Add(new Png(stream)); - } - else if (!manifest.Metadata.Hidden) - Log.Write("debug", "Mod '{0}' is missing 'icon.png'.".F(path)); - - return manifest; - } + return new Manifest(id, package); } catch (Exception e) {