mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-09-22 14:55:11 +00:00
Turn dupe type key into a metadata property
This commit is contained in:
@@ -444,9 +444,9 @@ namespace SabreTools.Metadata.DatFiles
|
||||
|
||||
// If the duplicate is external already
|
||||
#if NET20 || NET35
|
||||
if ((last.Read<DupeType>(DatItem.DupeTypeKey) & DupeType.External) != 0)
|
||||
if ((last.DupeType & DupeType.External) != 0)
|
||||
#else
|
||||
if (last.Read<DupeType>(DatItem.DupeTypeKey).HasFlag(DupeType.External))
|
||||
if (last.DupeType.HasFlag(DupeType.External))
|
||||
#endif
|
||||
output |= DupeType.External;
|
||||
|
||||
@@ -539,7 +539,7 @@ namespace SabreTools.Metadata.DatFiles
|
||||
savedRom.FillMissingInformation(romItem);
|
||||
|
||||
// Set the duplicate type on the saved item
|
||||
savedItem.Write(DatItem.DupeTypeKey, dupetype);
|
||||
savedItem.DupeType = dupetype;
|
||||
|
||||
// Get the sources associated with the items
|
||||
var savedSource = savedItem.Source;
|
||||
|
||||
@@ -750,9 +750,9 @@ namespace SabreTools.Metadata.DatFiles
|
||||
|
||||
// If the duplicate is external already
|
||||
#if NET20 || NET35
|
||||
if ((lastItem.Value.Value.Read<DupeType>(DatItem.DupeTypeKey) & DupeType.External) != 0)
|
||||
if ((lastItem.Value.Value.DupeType & DupeType.External) != 0)
|
||||
#else
|
||||
if (lastItem.Value.Value.Read<DupeType>(DatItem.DupeTypeKey).HasFlag(DupeType.External))
|
||||
if (lastItem.Value.Value.DupeType.HasFlag(DupeType.External))
|
||||
#endif
|
||||
output |= DupeType.External;
|
||||
|
||||
@@ -921,7 +921,7 @@ namespace SabreTools.Metadata.DatFiles
|
||||
else if (datItem is Rom romItem && savedItem is Rom savedRom)
|
||||
savedRom.FillMissingInformation(romItem);
|
||||
|
||||
savedItem.Write(DatItem.DupeTypeKey, dupetype);
|
||||
savedItem.DupeType = dupetype;
|
||||
|
||||
// Get the sources associated with the items
|
||||
var savedSource = _sources[_itemToSourceMapping[savedIndex]];
|
||||
|
||||
Reference in New Issue
Block a user