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,10 +10,7 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.FileSystem;
using OpenRA.Primitives;
namespace OpenRA.Graphics
{
@@ -42,7 +39,7 @@ namespace OpenRA.Graphics
var palettes = new Dictionary<string, ImmutablePalette>();
foreach (var p in nodesDict["Palettes"].Nodes)
palettes.Add(p.Key, new ImmutablePalette(GlobalFileSystem.Open(p.Value.Value), shadowIndex));
palettes.Add(p.Key, new ImmutablePalette(modData.ModFiles.Open(p.Value.Value), shadowIndex));
Palettes = palettes.AsReadOnly();