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:
@@ -11,8 +11,9 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using OpenRA.FileSystem;
|
||||
|
||||
namespace OpenRA.Graphics
|
||||
{
|
||||
@@ -47,9 +48,8 @@ namespace OpenRA.Graphics
|
||||
Size = texture.Size;
|
||||
}
|
||||
|
||||
public Sheet(SheetType type, string filename)
|
||||
public Sheet(SheetType type, Stream stream)
|
||||
{
|
||||
using (var stream = GlobalFileSystem.Open(filename))
|
||||
using (var bitmap = (Bitmap)Image.FromStream(stream))
|
||||
{
|
||||
Size = bitmap.Size;
|
||||
|
||||
Reference in New Issue
Block a user