Unstatic GlobalFileSystem and rename it to FileSystem

Add a ModFiles field on ModData and move all access to the file system to go through that.
This commit is contained in:
Pavel Penev
2015-10-09 13:55:08 +03:00
parent 5684bcec1c
commit 1b88d24cfa
46 changed files with 154 additions and 172 deletions

View File

@@ -10,7 +10,6 @@
using System;
using System.IO;
using OpenRA.FileSystem;
using OpenRA.Graphics;
namespace OpenRA.Mods.Common.UtilityCommands
@@ -30,9 +29,9 @@ namespace OpenRA.Mods.Common.UtilityCommands
Game.ModData = modData;
var map = new Map(args[1]);
GlobalFileSystem.UnmountAll();
modData.ModFiles.UnmountAll();
foreach (var dir in Game.ModData.Manifest.Folders)
GlobalFileSystem.Mount(dir);
modData.ModFiles.Mount(dir);
var minimap = Minimap.RenderMapPreview(map.Rules.TileSets[map.Tileset], map, true);