Misc remaining FileSystem cleanups.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"]);
|
||||
|
||||
Reference in New Issue
Block a user