mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
One more revert
This commit is contained in:
@@ -873,6 +873,30 @@ namespace SabreTools.Library.DatFiles
|
||||
|
||||
try
|
||||
{
|
||||
// Process description to machine name
|
||||
if (this.DescriptionAsName)
|
||||
MachineDescriptionToName(outDat);
|
||||
|
||||
// If we are using tags from the DAT, set the proper input for split type unless overridden
|
||||
if (useTags && this.InternalSplit == SplitType.None)
|
||||
this.InternalSplit = outDat.DatHeader.ForceMerging.AsSplitType();
|
||||
|
||||
// Run internal splitting
|
||||
ProcessSplitType(outDat, this.InternalSplit);
|
||||
|
||||
// We remove any blanks, if we aren't supposed to have any
|
||||
if (!outDat.DatHeader.KeepEmptyGames)
|
||||
{
|
||||
foreach (string key in outDat.Keys)
|
||||
{
|
||||
List<DatItem> items = outDat[key];
|
||||
List<DatItem> newitems = items.Where(i => i.ItemType != ItemType.Blank).ToList();
|
||||
|
||||
outDat.Remove(key);
|
||||
outDat.AddRange(key, newitems);
|
||||
}
|
||||
}
|
||||
|
||||
// Loop over every key in the dictionary
|
||||
List<string> keys = datFile.Keys;
|
||||
foreach (string key in keys)
|
||||
@@ -928,30 +952,6 @@ namespace SabreTools.Library.DatFiles
|
||||
outDat.AddRange(key, newitems);
|
||||
}
|
||||
|
||||
// Process description to machine name
|
||||
if (this.DescriptionAsName)
|
||||
MachineDescriptionToName(outDat);
|
||||
|
||||
// If we are using tags from the DAT, set the proper input for split type unless overridden
|
||||
if (useTags && this.InternalSplit == SplitType.None)
|
||||
this.InternalSplit = outDat.DatHeader.ForceMerging.AsSplitType();
|
||||
|
||||
// Run internal splitting
|
||||
ProcessSplitType(outDat, this.InternalSplit);
|
||||
|
||||
// We remove any blanks, if we aren't supposed to have any
|
||||
if (!outDat.DatHeader.KeepEmptyGames)
|
||||
{
|
||||
foreach (string key in outDat.Keys)
|
||||
{
|
||||
List<DatItem> items = outDat[key];
|
||||
List<DatItem> newitems = items.Where(i => i.ItemType != ItemType.Blank).ToList();
|
||||
|
||||
outDat.Remove(key);
|
||||
outDat.AddRange(key, newitems);
|
||||
}
|
||||
}
|
||||
|
||||
// If we are removing scene dates, do that now
|
||||
if (outDat.DatHeader.SceneDateStrip)
|
||||
StripSceneDatesFromItems(outDat);
|
||||
|
||||
Reference in New Issue
Block a user