messy first pass at fixing map change palette weirdness, etc

This commit is contained in:
Chris Forbes
2009-12-24 08:43:26 +13:00
parent a9010d1947
commit cf0be69f66
5 changed files with 32 additions and 6 deletions

View File

@@ -1,11 +1,13 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace OpenRa.FileFormats
{
public static class FileSystem
{
static List<IFolder> mountedFolders = new List<IFolder>();
static List<IFolder> temporaryMounts = new List<IFolder>();
public static void MountDefault( bool useAftermath )
{
@@ -33,6 +35,18 @@ namespace OpenRa.FileFormats
mountedFolders.Add(folder);
}
public static void MountTemporary(IFolder folder)
{
mountedFolders.Add(folder);
temporaryMounts.Add(folder);
}
public static void UnmountTemporaryPackages()
{
mountedFolders.RemoveAll(f => temporaryMounts.Contains(f));
temporaryMounts.Clear();
}
public static Stream Open(string filename)
{
foreach( IFolder folder in mountedFolders )