mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Replace more direct accessors to ItemDictionary
This commit is contained in:
@@ -387,7 +387,7 @@ namespace SabreTools.DatTools
|
||||
blankRom.SetName(romname);
|
||||
blankRom.SetFieldValue<Machine?>(DatItem.MachineKey, blankMachine);
|
||||
|
||||
datFile.Items["null"]?.Add(blankRom);
|
||||
datFile.Add("null", blankRom);
|
||||
#if NET40_OR_GREATER || NETCOREAPP
|
||||
});
|
||||
#else
|
||||
|
||||
@@ -168,7 +168,7 @@ namespace SabreTools.DatTools
|
||||
|
||||
foreach (var key in itemDictionary.Keys)
|
||||
{
|
||||
List<DatItem>? items = itemDictionary[key];
|
||||
List<DatItem>? items = itemDictionary.GetItemsForBucket(key);
|
||||
if (items == null)
|
||||
continue;
|
||||
|
||||
|
||||
@@ -797,7 +797,7 @@ namespace SabreTools.DatTools
|
||||
foreach (string machine in keys)
|
||||
{
|
||||
// Get the current machine
|
||||
var items = datFile.Items[machine];
|
||||
var items = datFile.GetItemsForBucket(machine);
|
||||
if (items == null || items.Count == 0)
|
||||
{
|
||||
_staticLogger.Error($"{machine} contains no items and will be skipped");
|
||||
|
||||
Reference in New Issue
Block a user