Loosen the matching criteria again

This commit is contained in:
Matt Nadareski
2020-08-31 17:02:43 -07:00
parent 0c10eaa52f
commit 816e360c36

View File

@@ -1415,7 +1415,7 @@ namespace SabreTools.Library.DatFiles
DatItem datItem = (DatItem)item.Clone(); DatItem datItem = (DatItem)item.Clone();
newdevs.AddRange((datItem.Machine.DeviceReferences ?? new List<ListXmlDeviceReference>()).Select(d => d.Name).ToList()); newdevs.AddRange((datItem.Machine.DeviceReferences ?? new List<ListXmlDeviceReference>()).Select(d => d.Name).ToList());
datItem.CopyMachineInformation(copyFrom); datItem.CopyMachineInformation(copyFrom);
if (!Items[game].Contains(datItem)) if (Items[game].Where(i => i.ItemType == datItem.ItemType && i.Name == datItem.Name).Count() == 0)
{ {
foundnew = true; foundnew = true;
Items.Add(game, datItem); Items.Add(game, datItem);
@@ -1473,7 +1473,7 @@ namespace SabreTools.Library.DatFiles
newSlotOptions.AddRange(machineSlotOptions); newSlotOptions.AddRange(machineSlotOptions);
datItem.CopyMachineInformation(copyFrom); datItem.CopyMachineInformation(copyFrom);
if (!Items[game].Contains(datItem)) if (Items[game].Where(i => i.ItemType == datItem.ItemType && i.Name == datItem.Name).Count() == 0)
{ {
foundnew = true; foundnew = true;
Items.Add(game, datItem); Items.Add(game, datItem);