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:
@@ -12,7 +12,6 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using OpenRA.FileSystem;
|
||||
|
||||
namespace OpenRA
|
||||
{
|
||||
@@ -230,12 +229,6 @@ namespace OpenRA
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static List<MiniYamlNode> FromFileInPackage(string path)
|
||||
{
|
||||
using (var stream = GlobalFileSystem.Open(path))
|
||||
return FromLines(stream.ReadAllLines(), path);
|
||||
}
|
||||
|
||||
public static Dictionary<string, MiniYaml> DictFromFile(string path)
|
||||
{
|
||||
return FromFile(path).ToDictionary(x => x.Key, x => x.Value);
|
||||
|
||||
Reference in New Issue
Block a user