mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-09-22 23:05:12 +00:00
Get rid of Software metadata item
Apparently this was a mistake that has proliferated over a very long time. The Software item that was being modeled was actually the game/machine equivilent from SoftwareList. But because there's both an item called SoftwareList and a DAT type called SoftwareList, some wire got crossed and they were mentally combined. Undoing this allows for a more proper internal model, including a couple of extraneous keys that were included originally.
This commit is contained in:
@@ -63,7 +63,6 @@ namespace SabreTools.Data.Extensions
|
||||
SharedFeat sharedFeat => sharedFeat.Name,
|
||||
Slot slot => slot.Name,
|
||||
SlotOption slotOption => slotOption.Name,
|
||||
Software software => software.Name,
|
||||
SoftwareList softwareList => softwareList.Name,
|
||||
Sound => null,
|
||||
SourceDetails => null,
|
||||
@@ -124,7 +123,6 @@ namespace SabreTools.Data.Extensions
|
||||
case SharedFeat sharedFeat: sharedFeat.Name = name; break;
|
||||
case Slot slot: slot.Name = name; break;
|
||||
case SlotOption slotOption: slotOption.Name = name; break;
|
||||
case Software software: software.Name = name; break;
|
||||
case SoftwareList softwareList: softwareList.Name = name; break;
|
||||
case Sound: break;
|
||||
case SourceDetails: break;
|
||||
@@ -186,6 +184,8 @@ namespace SabreTools.Data.Extensions
|
||||
return sharedFeat.Clone() as SharedFeat;
|
||||
else if (self is SlotOption slotOption)
|
||||
return slotOption.Clone() as SlotOption;
|
||||
else if (self is SoftwareList softwareList)
|
||||
return softwareList.Clone() as SoftwareList;
|
||||
else if (self is Sound sound)
|
||||
return sound.Clone() as Sound;
|
||||
else if (self is Video video)
|
||||
@@ -329,19 +329,6 @@ namespace SabreTools.Data.Extensions
|
||||
cloneRom.Status = selfRom.Status;
|
||||
cloneRom.Value = selfRom.Value;
|
||||
}
|
||||
else if (self is Software selfSoftware && clone is Software cloneSoftware)
|
||||
{
|
||||
cloneSoftware.Description = selfSoftware.Description;
|
||||
cloneSoftware.Supported = selfSoftware.Supported;
|
||||
}
|
||||
else if (self is SoftwareList selfSoftwareList && clone is SoftwareList cloneSoftwareList)
|
||||
{
|
||||
cloneSoftwareList.Description = selfSoftwareList.Description;
|
||||
cloneSoftwareList.Filter = selfSoftwareList.Filter;
|
||||
cloneSoftwareList.Notes = selfSoftwareList.Notes;
|
||||
cloneSoftwareList.Status = selfSoftwareList.Status;
|
||||
cloneSoftwareList.Tag = selfSoftwareList.Tag;
|
||||
}
|
||||
|
||||
// Handle known properties
|
||||
clone.SetName(self.GetName());
|
||||
|
||||
Reference in New Issue
Block a user