Bugfixes: ZipFile.GetInputStream().GetAllBytes/.Length doesn't work; Divide by zero when no shellmaps are available; UseAsShellmap isn't saved by the editor; Duplicate maps crashes game.
This commit is contained in:
@@ -195,11 +195,12 @@ namespace OpenRA
|
||||
|
||||
public void Save(string toPath)
|
||||
{
|
||||
Console.WriteLine("Saving map to path {0}",toPath);
|
||||
// Todo: save to a zip file in the support dir by default
|
||||
MapFormat = 3;
|
||||
|
||||
var root = new List<MiniYamlNode>();
|
||||
foreach (var field in new string[] {"Selectable", "MapFormat", "Title", "Description", "Author", "PlayerCount", "Tileset", "MapSize", "TopLeft", "BottomRight"})
|
||||
foreach (var field in new string[] {"Selectable", "MapFormat", "Title", "Description", "Author", "PlayerCount", "Tileset", "MapSize", "TopLeft", "BottomRight", "UseAsShellmap"})
|
||||
{
|
||||
FieldInfo f = this.GetType().GetField(field);
|
||||
if (f.GetValue(this) == null) continue;
|
||||
|
||||
Reference in New Issue
Block a user