ItemDictionary is no longer IDictionary

This commit is contained in:
Matt Nadareski
2025-01-14 10:38:46 -05:00
parent b29f7c65a4
commit 8c3c6ab3e8
8 changed files with 36 additions and 126 deletions

View File

@@ -536,7 +536,8 @@ namespace SabreTools.DatFiles
if (datItem.Clone() is not DatItem newDatItem)
continue;
if (!datFile.Items.TryGetValue(key, out var list) || list == null)
var list = datFile.GetItemsForBucket(key);
if (list.Count == 0)
continue;
if (datFile.Items.ContainsKey(key) && list.Count > 0)
@@ -697,7 +698,8 @@ namespace SabreTools.DatFiles
if (useGames)
{
// If the key is null, keep it
if (!intDat.Items.TryGetValue(key, out var intList) || intList == null)
var intList = intDat.GetItemsForBucket(key);
if (intList.Count == 0)
#if NET40_OR_GREATER || NETCOREAPP
return;
#else
@@ -705,7 +707,8 @@ namespace SabreTools.DatFiles
#endif
// If the base DAT doesn't contain the key, keep it
if (!datFile.Items.TryGetValue(key, out var list) || list == null)
var list = datFile.GetItemsForBucket(key);
if (list.Count == 0)
#if NET40_OR_GREATER || NETCOREAPP
return;
#else