Merge pull request #5550 from pavlos256/reload-chrome

Add developer shortcut to reload chrome files
This commit is contained in:
Paul Chote
2014-06-14 17:25:18 +12:00
6 changed files with 130 additions and 57 deletions

View File

@@ -27,6 +27,8 @@ namespace OpenRA.Graphics
static Dictionary<string, Sheet> cachedSheets;
static Dictionary<string, Dictionary<string, Sprite>> cachedSprites;
static string[] storedChromeFiles;
public static void Initialize(params string[] chromeFiles)
{
collections = new Dictionary<string, Collection>();
@@ -34,7 +36,13 @@ namespace OpenRA.Graphics
cachedSprites = new Dictionary<string, Dictionary<string, Sprite>>();
if (chromeFiles.Length == 0)
return;
{
chromeFiles = storedChromeFiles;
if (chromeFiles == null || chromeFiles.Length == 0)
return;
}
else
storedChromeFiles = chromeFiles;
var chrome = chromeFiles.Select(s => MiniYaml.FromFile(s)).Aggregate(MiniYaml.MergeLiberal);