diff --git a/SabreTools.Helper/Data/Build.cs b/SabreTools.Helper/Data/Build.cs index 15a2acc2..e77ac08a 100644 --- a/SabreTools.Helper/Data/Build.cs +++ b/SabreTools.Helper/Data/Build.cs @@ -316,9 +316,9 @@ namespace SabreTools.Helper.Data helptext.Add(" -clean Clean game names according to WoD standards"); helptext.Add(" -sl, --softlist Use Software List name instead of description"); helptext.Add(" -dm, --dat-merge Create merged sets in the output DAT"); - helptext.Add(" -ds, --dat-sp Create split sets in the output DAT"); - helptext.Add(" -dnm, --dat-nm Create non-merged sets in the output DAT"); - helptext.Add(" -df, --dat-fnm Create fully non-merged sets in the output"); + helptext.Add(" -ds, --dat-split Create split sets in the output DAT"); + helptext.Add(" -dnm, --dat-nonmerge Create non-merged sets in the output DAT"); + helptext.Add(" -df, --dat-fullnonmerge Create fully non-merged sets in the output"); helptext.Add(" -trim Trim file names to fit NTFS length"); helptext.Add(" -rd=, --root-dir= Set the root directory for calc"); helptext.Add(" -si, --single All game names replaced by '!'"); diff --git a/SabreTools.Helper/Dats/Partials/DatFile.Bucketing.cs b/SabreTools.Helper/Dats/Partials/DatFile.Bucketing.cs index 793829bf..fba1ec75 100644 --- a/SabreTools.Helper/Dats/Partials/DatFile.Bucketing.cs +++ b/SabreTools.Helper/Dats/Partials/DatFile.Bucketing.cs @@ -388,11 +388,6 @@ namespace SabreTools.Helper.Dats List games = Keys.ToList(); foreach (string game in games) { - if (game.Contains("galaga")) - { - logger.Verbose(""); - } - // Determine if the game has any devices or not if (this[game][0].Machine.Devices.Count > 0) { @@ -416,7 +411,7 @@ namespace SabreTools.Helper.Dats case ItemType.Archive: Archive archive = ((Archive)item).Clone() as Archive; archive.Machine = musheen; - if (this[game].Where(i => i.Name == archive.Name).Count() == 0) + if (this[game].Where(i => i.Name == archive.Name).Count() == 0 && !this[game].Contains(archive)) { this[game].Add(archive); } @@ -425,7 +420,7 @@ namespace SabreTools.Helper.Dats case ItemType.BiosSet: BiosSet biosSet = ((BiosSet)item).Clone() as BiosSet; biosSet.Machine = musheen; - if (this[game].Where(i => i.Name == biosSet.Name).Count() == 0) + if (this[game].Where(i => i.Name == biosSet.Name).Count() == 0 && !this[game].Contains(biosSet)) { this[game].Add(biosSet); } @@ -434,7 +429,7 @@ namespace SabreTools.Helper.Dats case ItemType.Disk: Disk disk = ((Disk)item).Clone() as Disk; disk.Machine = musheen; - if (this[game].Where(i => i.Name == disk.Name).Count() == 0) + if (this[game].Where(i => i.Name == disk.Name).Count() == 0 && !this[game].Contains(disk)) { this[game].Add(disk); } @@ -443,7 +438,7 @@ namespace SabreTools.Helper.Dats case ItemType.Release: Release release = ((Release)item).Clone() as Release; release.Machine = musheen; - if (this[game].Where(i => i.Name == release.Name).Count() == 0) + if (this[game].Where(i => i.Name == release.Name).Count() == 0 && !this[game].Contains(release)) { this[game].Add(release); } @@ -452,7 +447,7 @@ namespace SabreTools.Helper.Dats case ItemType.Rom: Rom rom = ((Rom)item).Clone() as Rom; rom.Machine = musheen; - if (this[game].Where(i => i.Name == rom.Name).Count() == 0) + if (this[game].Where(i => i.Name == rom.Name).Count() == 0 && !this[game].Contains(rom)) { this[game].Add(rom); } @@ -461,7 +456,7 @@ namespace SabreTools.Helper.Dats case ItemType.Sample: Sample sample = ((Sample)item).Clone() as Sample; sample.Machine = musheen; - if (this[game].Where(i => i.Name == sample.Name).Count() == 0) + if (this[game].Where(i => i.Name == sample.Name).Count() == 0 && !this[game].Contains(sample)) { this[game].Add(sample); } @@ -521,7 +516,7 @@ namespace SabreTools.Helper.Dats case ItemType.Archive: Archive archive = ((Archive)item).Clone() as Archive; archive.Machine = currentMachine; - if (!this[game].Contains(archive)) + if (this[game].Where(i => i.Name == archive.Name).Count() == 0 && !this[game].Contains(archive)) { this[game].Add(archive); } @@ -530,7 +525,7 @@ namespace SabreTools.Helper.Dats case ItemType.BiosSet: BiosSet biosSet = ((BiosSet)item).Clone() as BiosSet; biosSet.Machine = currentMachine; - if (!this[game].Contains(biosSet)) + if (this[game].Where(i => i.Name == biosSet.Name).Count() == 0 && !this[game].Contains(biosSet)) { this[game].Add(biosSet); } @@ -539,7 +534,7 @@ namespace SabreTools.Helper.Dats case ItemType.Disk: Disk disk = ((Disk)item).Clone() as Disk; disk.Machine = currentMachine; - if (!this[game].Contains(disk)) + if (this[game].Where(i => i.Name == disk.Name).Count() == 0 && !this[game].Contains(disk)) { this[game].Add(disk); } @@ -548,7 +543,7 @@ namespace SabreTools.Helper.Dats case ItemType.Release: Release release = ((Release)item).Clone() as Release; release.Machine = currentMachine; - if (!this[game].Contains(release)) + if (this[game].Where(i => i.Name == release.Name).Count() == 0 && !this[game].Contains(release)) { this[game].Add(release); } @@ -557,7 +552,7 @@ namespace SabreTools.Helper.Dats case ItemType.Rom: Rom rom = ((Rom)item).Clone() as Rom; rom.Machine = currentMachine; - if (!this[game].Contains(rom)) + if (this[game].Where(i => i.Name == rom.Name).Count() == 0 && !this[game].Contains(rom)) { this[game].Add(rom); } @@ -566,7 +561,7 @@ namespace SabreTools.Helper.Dats case ItemType.Sample: Sample sample = ((Sample)item).Clone() as Sample; sample.Machine = currentMachine; - if (!this[game].Contains(sample)) + if (this[game].Where(i => i.Name == sample.Name).Count() == 0 && !this[game].Contains(sample)) { this[game].Add(sample); } @@ -713,7 +708,7 @@ namespace SabreTools.Helper.Dats case ItemType.Archive: Archive archive = ((Archive)item).Clone() as Archive; archive.Machine = currentMachine; - if (this[game].Where(i => i.Name == archive.Name).Count() == 0) + if (this[game].Where(i => i.Name == archive.Name).Count() == 0 && !this[game].Contains(archive)) { this[game].Add(archive); } @@ -722,7 +717,7 @@ namespace SabreTools.Helper.Dats case ItemType.BiosSet: BiosSet biosSet = ((BiosSet)item).Clone() as BiosSet; biosSet.Machine = currentMachine; - if (this[game].Where(i => i.Name == biosSet.Name).Count() == 0) + if (this[game].Where(i => i.Name == biosSet.Name).Count() == 0 && !this[game].Contains(biosSet)) { this[game].Add(biosSet); } @@ -731,7 +726,7 @@ namespace SabreTools.Helper.Dats case ItemType.Disk: Disk disk = ((Disk)item).Clone() as Disk; disk.Machine = currentMachine; - if (this[game].Where(i => i.Name == disk.Name).Count() == 0) + if (this[game].Where(i => i.Name == disk.Name).Count() == 0 && !this[game].Contains(disk)) { this[game].Add(disk); } @@ -740,7 +735,7 @@ namespace SabreTools.Helper.Dats case ItemType.Release: Release release = ((Release)item).Clone() as Release; release.Machine = currentMachine; - if (this[game].Where(i => i.Name == release.Name).Count() == 0) + if (this[game].Where(i => i.Name == release.Name).Count() == 0 && !this[game].Contains(release)) { this[game].Add(release); } @@ -749,7 +744,7 @@ namespace SabreTools.Helper.Dats case ItemType.Rom: Rom rom = ((Rom)item).Clone() as Rom; rom.Machine = currentMachine; - if (this[game].Where(i => i.Name == rom.Name).Count() == 0) + if (this[game].Where(i => i.Name == rom.Name).Count() == 0 && !this[game].Contains(rom)) { this[game].Add(rom); } @@ -758,7 +753,7 @@ namespace SabreTools.Helper.Dats case ItemType.Sample: Sample sample = ((Sample)item).Clone() as Sample; sample.Machine = currentMachine; - if (this[game].Where(i => i.Name == sample.Name).Count() == 0) + if (this[game].Where(i => i.Name == sample.Name).Count() == 0 && !this[game].Contains(sample)) { this[game].Add(sample); } diff --git a/SabreTools.Helper/README.1ST b/SabreTools.Helper/README.1ST index d101173d..3e68b056 100644 --- a/SabreTools.Helper/README.1ST +++ b/SabreTools.Helper/README.1ST @@ -734,15 +734,15 @@ Options: Preprocess the DAT to have parent sets contain all items from the children based on the cloneof tag. This is incompatible with the other --dat-X flags. - -ds, --dat-sp Create split sets in the output DAT + -ds, --dat-split Create split sets in the output DAT Preprocess the DAT to remove redundant files between parents and children based on the romof and cloneof tags. This is incompatible with the other --dat-X flags. - -dnm, --dat-nm Create non-merged sets in the output DAT + -dnm, --dat-nonmerge Create non-merged sets in the output DAT Preprocess the DAT to have child sets contain all items from the parent set based on the cloneof tag. This is incompatible with the other --dat-X flags. - -df, --dat-fnm Create fully non-merged sets in the output DAT + -df, --dat-fullnonmerge Create fully non-merged sets in the output DAT Preprocess the DAT to have child sets contain all items from the parent sets based on the cloneof and romof tags as well as device references. This is incompatible with the other --dat-X flags. diff --git a/SabreTools/SabreTools.cs b/SabreTools/SabreTools.cs index c82e55ff..37a87620 100644 --- a/SabreTools/SabreTools.cs +++ b/SabreTools/SabreTools.cs @@ -257,7 +257,7 @@ namespace SabreTools delete = true; break; case "-df": - case "--dat-fnm": + case "--dat-fullnonmerge": splitType = SplitType.FullNonMerged; break; case "-di": @@ -281,11 +281,11 @@ namespace SabreTools splitType = SplitType.Merged; break; case "-dnm": - case "--dat-nm": + case "--dat-nonmerge": splitType = SplitType.NonMerged; break; case "-ds": - case "--dat-sp": + case "--dat-split": splitType = SplitType.Split; break; case "-f":