Fix RemoveTagsFromChildImplDB

This commit is contained in:
Matt Nadareski
2025-01-13 00:29:39 -05:00
parent 47b618be16
commit 9e76e9e033

View File

@@ -1154,17 +1154,9 @@ namespace SabreTools.DatFiles
/// </summary>
private void RemoveTagsFromChildImplDB()
{
List<string> games = [.. ItemsDB.SortedKeys];
foreach (string game in games)
var machines = ItemsDB.GetMachines();
foreach (var machine in machines)
{
// If the game has no items in it, we want to continue
var items = GetItemsForBucketDB(game);
if (items == null || items.Count == 0)
continue;
foreach (long id in items.Keys)
{
var machine = ItemsDB.GetMachineForItem(id);
if (machine.Value == null)
continue;
@@ -1173,7 +1165,6 @@ namespace SabreTools.DatFiles
machine.Value.SetFieldValue<string?>(Models.Metadata.Machine.SampleOfKey, null);
}
}
}
#endregion
}