Misc remaining FileSystem cleanups.

This commit is contained in:
Paul Chote
2016-02-15 03:37:08 +00:00
parent d573e21a48
commit 88f6daf57f
8 changed files with 15 additions and 10 deletions

View File

@@ -122,7 +122,8 @@ namespace OpenRA
return itemSet;
}
Dictionary<string, TileSet> LoadTileSets(IReadOnlyFileSystem fileSystem, Dictionary<string, TileSet> itemCache, Dictionary<string, SequenceCache> sequenceCaches, string[] files)
Dictionary<string, TileSet> LoadTileSets(IReadOnlyFileSystem fileSystem, Dictionary<string, TileSet> itemCache,
Dictionary<string, SequenceCache> sequenceCaches, string[] files)
{
var items = new Dictionary<string, TileSet>();
@@ -133,7 +134,7 @@ namespace OpenRA
items.Add(t.Id, t);
else
{
t = new TileSet(modData, file);
t = new TileSet(fileSystem, file);
itemCache.Add(file, t);
// every time we load a tile set, we create a sequence cache for it

View File

@@ -12,6 +12,7 @@ using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using OpenRA.FileSystem;
using OpenRA.Primitives;
namespace OpenRA
@@ -191,9 +192,9 @@ namespace OpenRA
// Private default ctor for serialization comparison
TileSet() { }
public TileSet(ModData modData, string filepath)
public TileSet(IReadOnlyFileSystem fileSystem, string filepath)
{
var yaml = MiniYaml.DictFromStream(modData.ModFiles.Open(filepath));
var yaml = MiniYaml.DictFromStream(fileSystem.Open(filepath));
// General info
FieldLoader.Load(this, yaml["General"]);