2023-08-14 13:17:51 -04:00
|
|
|
using System.Xml.Serialization;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
|
|
|
|
namespace SabreTools.DatItems.Formats
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Represents one ListXML dipvalue
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonObject("dipvalue"), XmlRoot("dipvalue")]
|
2024-03-10 20:39:54 -04:00
|
|
|
public sealed class DipValue : DatItem<Models.Metadata.DipValue>
|
2023-08-14 13:17:51 -04:00
|
|
|
{
|
|
|
|
|
#region Fields
|
|
|
|
|
|
2024-03-10 20:39:54 -04:00
|
|
|
/// <inheritdoc>/>
|
|
|
|
|
protected override ItemType ItemType => ItemType.DipValue;
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc>/>
|
|
|
|
|
protected override string? NameKey => Models.Metadata.DipValue.NameKey;
|
|
|
|
|
|
2023-08-14 13:17:51 -04:00
|
|
|
[JsonIgnore]
|
2024-03-09 21:34:26 -05:00
|
|
|
public bool ConditionsSpecified
|
2023-08-14 13:17:51 -04:00
|
|
|
{
|
2024-03-09 21:34:26 -05:00
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
var conditions = GetFieldValue<Condition[]?>(Models.Metadata.DipValue.ConditionKey);
|
|
|
|
|
return conditions != null && conditions.Length > 0;
|
|
|
|
|
}
|
2023-08-14 13:17:51 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Constructors
|
|
|
|
|
|
2024-03-10 20:39:54 -04:00
|
|
|
public DipValue() : base() { }
|
|
|
|
|
public DipValue(Models.Metadata.DipValue item) : base(item) { }
|
2023-08-14 13:17:51 -04:00
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|