diff --git a/SabreTools.Helper/Dats/Partials/DatFile.Bucketing.cs b/SabreTools.Helper/Dats/Partials/DatFile.Bucketing.cs index d31dc1dc..4aaf47b8 100644 --- a/SabreTools.Helper/Dats/Partials/DatFile.Bucketing.cs +++ b/SabreTools.Helper/Dats/Partials/DatFile.Bucketing.cs @@ -395,8 +395,11 @@ namespace SabreTools.Helper.Dats // Now that we have looped through the cloneof tags, we loop through the romof tags AddRomsFromBios(logger); - // Finally, remove the romof and cloneof tags so it's not picked up by the manager + // Then, remove the romof and cloneof tags so it's not picked up by the manager RemoveTagsFromChild(logger); + + // Finally, remove all sets that are labeled as bios or device + RemoveBiosAndDeviceSets(logger); } /// @@ -819,6 +822,24 @@ namespace SabreTools.Helper.Dats } } + /// + /// Remove all BIOS and device sets + /// + /// + private void RemoveBiosAndDeviceSets(Logger logger) + { + List games = Keys.ToList(); + foreach (string game in games) + { + if (this[game].Count > 0 + && (this[game][0].Machine.MachineType == MachineType.Bios + || this[game][0].Machine.MachineType == MachineType.Device)) + { + Remove(game); + } + } + } + /// /// Use romof tags to remove roms from the children ///