Use Filepaths instead of IFolders where possible.

This commit is contained in:
Paul Chote
2010-12-29 19:14:48 +13:00
parent 829fe6530a
commit fc6438e311
6 changed files with 12 additions and 17 deletions

View File

@@ -18,7 +18,8 @@ namespace OpenRA.FileFormats
{
public class MapStub
{
public IFolder Container { get; protected set; }
protected IFolder Container;
public string Path;
// Yaml map data
public string Uid { get; protected set; }
@@ -43,11 +44,9 @@ namespace OpenRA.FileFormats
public MapStub() {} // Hack for the editor - not used for anything important
public MapStub(string path)
: this(FileSystem.OpenPackage(path, int.MaxValue)) {}
public MapStub(IFolder container)
{
Container = container;
Path = path;
Container = FileSystem.OpenPackage(path, int.MaxValue);
var yaml = MiniYaml.FromStream(Container.GetContent("map.yaml"));
FieldLoader.Load( this, new MiniYaml( null, yaml ) );