Merge pull request #9483 from reaperrr/cleanup-assets

Clean up assets
This commit is contained in:
Oliver Brakmann
2015-10-03 12:37:55 +02:00
14 changed files with 15 additions and 14 deletions

View File

@@ -281,6 +281,7 @@ namespace OpenRA
Sound.Initialize();
ModData = new ModData(mod, !Settings.Server.Dedicated);
ModData.MountFiles();
ModData.InitializeLoaders();
if (!Settings.Server.Dedicated)
Renderer.InitializeFonts(ModData.Manifest);

View File

@@ -74,11 +74,6 @@ namespace OpenRA
SpriteSequenceLoader = (ISpriteSequenceLoader)ctor.Invoke(new[] { this });
SpriteSequenceLoader.OnMissingSpriteError = s => Log.Write("debug", s);
// HACK: Mount only local folders so we have a half-working environment for the asset installer
GlobalFileSystem.UnmountAll();
foreach (var dir in Manifest.Folders)
GlobalFileSystem.Mount(dir);
defaultRules = Exts.Lazy(() => RulesetCache.Load());
initialThreadId = System.Threading.Thread.CurrentThread.ManagedThreadId;
@@ -92,6 +87,11 @@ namespace OpenRA
LoadScreen.Display();
}
public void MountFiles()
{
GlobalFileSystem.LoadFromManifest(Manifest);
}
public void InitializeLoaders()
{
// all this manipulation of static crap here is nasty and breaks