diff --git a/OpenRA.Game/Graphics/ChromeProvider.cs b/OpenRA.Game/Graphics/ChromeProvider.cs index b4f2c83c9c..0d6fbf66db 100644 --- a/OpenRA.Game/Graphics/ChromeProvider.cs +++ b/OpenRA.Game/Graphics/ChromeProvider.cs @@ -25,23 +25,12 @@ namespace OpenRA.Graphics static Dictionary cachedSheets; static Dictionary> cachedSprites; - static string[] storedChromeFiles; - - public static void Initialize(params string[] chromeFiles) + public static void Initialize(IEnumerable chromeFiles) { collections = new Dictionary(); cachedSheets = new Dictionary(); cachedSprites = new Dictionary>(); - if (chromeFiles.Length == 0) - { - chromeFiles = storedChromeFiles; - if (chromeFiles == null || chromeFiles.Length == 0) - return; - } - else - storedChromeFiles = chromeFiles; - var chrome = chromeFiles.Select(s => MiniYaml.FromFile(s)).Aggregate(MiniYaml.MergeLiberal); foreach (var c in chrome) diff --git a/OpenRA.Game/Widgets/RootWidget.cs b/OpenRA.Game/Widgets/RootWidget.cs index 92d970ac0d..eb192f17c5 100644 --- a/OpenRA.Game/Widgets/RootWidget.cs +++ b/OpenRA.Game/Widgets/RootWidget.cs @@ -27,7 +27,7 @@ namespace OpenRA.Widgets if (hk == Game.Settings.Keys.DevReloadChromeKey) { - ChromeProvider.Initialize(); + ChromeProvider.Initialize(Game.modData.Manifest.Chrome); return true; } }