Make map saving independent of Container type. Saving zip/oramap/mix untested as the editor cannot load non-folder maps.

This commit is contained in:
Paul Chote
2010-12-29 11:39:26 +13:00
parent fa36c71023
commit c3ff679f3a
8 changed files with 73 additions and 81 deletions

View File

@@ -10,6 +10,7 @@
using System.Collections.Generic;
using System.IO;
using System;
namespace OpenRA.FileFormats
{
@@ -43,5 +44,13 @@ namespace OpenRA.FileFormats
{
get { return priority; }
}
public void Write(Dictionary<string, byte[]> contents)
{
foreach (var file in contents)
using (var dataStream = File.Create(Path.Combine(path, file.Key)))
using (var writer = new BinaryWriter(dataStream))
writer.Write(file.Value);
}
}
}