mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-04-21 05:39:42 +00:00
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.
67 lines
2.0 KiB
C#
67 lines
2.0 KiB
C#
using System.Xml.Serialization;
|
|
using Newtonsoft.Json;
|
|
using SabreTools.Data.Extensions;
|
|
|
|
namespace SabreTools.Metadata.DatItems.Formats
|
|
{
|
|
/// <summary>
|
|
/// Represents which SoftwareList(s) is associated with a set
|
|
/// </summary>
|
|
[JsonObject("softwarelist"), XmlRoot("softwarelist")]
|
|
public sealed class SoftwareList : DatItem<Data.Models.Metadata.SoftwareList>
|
|
{
|
|
#region Fields
|
|
|
|
public string? Filter
|
|
{
|
|
get => (_internal as Data.Models.Metadata.SoftwareList)?.Filter;
|
|
set => (_internal as Data.Models.Metadata.SoftwareList)?.Filter = value;
|
|
}
|
|
|
|
/// <inheritdoc>/>
|
|
public override Data.Models.Metadata.ItemType ItemType
|
|
=> Data.Models.Metadata.ItemType.SoftwareList;
|
|
|
|
public string? Name
|
|
{
|
|
get => (_internal as Data.Models.Metadata.SoftwareList)?.Name;
|
|
set => (_internal as Data.Models.Metadata.SoftwareList)?.Name = value;
|
|
}
|
|
|
|
public Data.Models.Metadata.SoftwareListStatus? Status
|
|
{
|
|
get => (_internal as Data.Models.Metadata.SoftwareList)?.Status;
|
|
set => (_internal as Data.Models.Metadata.SoftwareList)?.Status = value;
|
|
}
|
|
|
|
public string? Tag
|
|
{
|
|
get => (_internal as Data.Models.Metadata.SoftwareList)?.Tag;
|
|
set => (_internal as Data.Models.Metadata.SoftwareList)?.Tag = value;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Constructors
|
|
|
|
public SoftwareList() : base() { }
|
|
|
|
public SoftwareList(Data.Models.Metadata.SoftwareList item) : base(item) { }
|
|
|
|
public SoftwareList(Data.Models.Metadata.SoftwareList item, Machine machine, Source source) : this(item)
|
|
{
|
|
Source = source;
|
|
CopyMachineInformation(machine);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Cloning Methods
|
|
|
|
/// <inheritdoc/>
|
|
public override object Clone() => new SoftwareList(_internal.DeepClone() as Data.Models.Metadata.SoftwareList ?? []);
|
|
|
|
#endregion
|
|
}
|
|
}
|