Make output comperable to regular parsing

This commit is contained in:
Matt Nadareski
2016-04-28 16:58:59 -07:00
parent fd9451c9bd
commit 2b4ac97f36

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using Mono.Data.Sqlite;
using System.IO;
using System.Linq;
using System.Text;
using System.Web;
@@ -161,6 +162,30 @@ namespace SabreTools.Helper
outDir += Path.DirectorySeparatorChar;
}
// Get all values in the dictionary and write out
List<RomData> sortable = new List<RomData>();
List<string> keys = dict.Keys.ToList();
foreach (string key in keys)
{
if (merge)
{
sortable.Add(dict[key][0]);
dict.Remove(key);
}
else
{
sortable.AddRange(dict[key]);
dict.Remove(key);
}
}
// Sort the new list
RomManipulation.Sort(sortable, true);
// Now write out to file
return WriteToDat(name, description, version, date, category, author, forceunpack, old, outDir, sortable, logger);
/*
// (currently uses current time, change to "last updated time")
logger.Log("Opening file for writing: " + outDir + description + (old ? ".dat" : ".xml"));
@@ -257,6 +282,7 @@ namespace SabreTools.Helper
}
return true;
*/
}
/// <summary>