Files
SabreTools/SabreTools.DatItems/Formats/Slot.cs

40 lines
996 B
C#
Raw Normal View History

2024-03-09 21:34:26 -05:00
using System.Xml.Serialization;
2020-09-01 16:21:55 -07:00
using Newtonsoft.Json;
2021-02-02 10:23:43 -08:00
namespace SabreTools.DatItems.Formats
2020-09-01 16:21:55 -07:00
{
/// <summary>
/// Represents which Slot(s) is associated with a set
/// </summary>
2020-09-08 10:12:41 -07:00
[JsonObject("slot"), XmlRoot("slot")]
2024-03-10 20:39:54 -04:00
public sealed class Slot : DatItem<Models.Metadata.Slot>
2020-09-01 16:21:55 -07:00
{
#region Fields
2024-03-10 20:39:54 -04:00
/// <inheritdoc>/>
protected override ItemType ItemType => ItemType.Slot;
/// <inheritdoc>/>
protected override string? NameKey => Models.Metadata.Slot.NameKey;
2024-03-09 21:34:26 -05:00
[JsonIgnore]
public bool SlotOptionsSpecified
{
2024-03-09 21:34:26 -05:00
get
{
var slotOptions = GetFieldValue<SlotOption[]?>(Models.Metadata.Slot.SlotOptionKey);
return slotOptions != null && slotOptions.Length > 0;
}
}
2020-09-01 16:21:55 -07:00
#endregion
#region Constructors
2024-03-10 20:39:54 -04:00
public Slot() : base() { }
public Slot(Models.Metadata.Slot item) : base(item) { }
2020-09-01 16:21:55 -07:00
#endregion
}
}