Replace more direct accessors to ItemDictionary

This commit is contained in:
Matt Nadareski
2025-01-13 09:40:13 -05:00
parent c94d8d712f
commit dc69663cd6
3 changed files with 1 additions and 7 deletions

View File

@@ -169,9 +169,6 @@ namespace SabreTools.DatTools
// Run cleaning per item // Run cleaning per item
CleanDatItem(item); CleanDatItem(item);
} }
// Assign back for caution
datFile.Items[key] = items;
} }
} }

View File

@@ -838,7 +838,7 @@ namespace SabreTools.DatTools
} }
// Add the current machine to the current DatFile // Add the current machine to the current DatFile
currentDat.Items[machine] = items; currentDat.Add(machine, items);
currentSize += machineSize; currentSize += machineSize;
} }

View File

@@ -229,9 +229,6 @@ namespace SabreTools.DatTools
if (items[i].GetFieldValue<Source?>(DatItem.SourceKey)?.Index != int.MaxValue) if (items[i].GetFieldValue<Source?>(DatItem.SourceKey)?.Index != int.MaxValue)
items[i].SetFieldValue<bool?>(DatItem.RemoveKey, true); items[i].SetFieldValue<bool?>(DatItem.RemoveKey, true);
} }
// Set the list back, just in case
datFile.Items[key] = items;
} }
watch.Stop(); watch.Stop();