mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Fix ordering issue by source
This commit is contained in:
@@ -256,7 +256,8 @@ namespace SabreTools.DatTools
|
||||
List<DatFile> outDats = [];
|
||||
|
||||
// Ensure the current DatFile is sorted optimally
|
||||
datFile.BucketBy(ItemKey.CRC);
|
||||
datFile.BucketBy(ItemKey.CRC, norename: false);
|
||||
datFile.Deduplicate();
|
||||
|
||||
// Loop through each of the inputs and get or create a new DatData object
|
||||
InternalStopwatch watch = new("Initializing and filling all output DATs");
|
||||
@@ -306,7 +307,7 @@ namespace SabreTools.DatTools
|
||||
foreach (var key in datFile.Items.SortedKeys)
|
||||
#endif
|
||||
{
|
||||
List<DatItem> items = ItemDictionary.Merge(datFile.GetItemsForBucket(key));
|
||||
List<DatItem> items = datFile.GetItemsForBucket(key);
|
||||
|
||||
// If the rom list is empty or null, just skip it
|
||||
if (items == null || items.Count == 0)
|
||||
|
||||
@@ -552,7 +552,7 @@ namespace SabreTools.DatTools
|
||||
/// <returns>-1 for a coming before b, 0 for a == b, 1 for a coming after b</returns>
|
||||
private static int SplitByLevelSort(string a, string b)
|
||||
{
|
||||
NaturalComparer nc = new();
|
||||
var nc = new NaturalComparer();
|
||||
int adeep = a.Count(c => c == '/' || c == '\\');
|
||||
int bdeep = b.Count(c => c == '/' || c == '\\');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user