mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
40 lines
1.0 KiB
C#
40 lines
1.0 KiB
C#
using System.Xml.Serialization;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace SabreTools.DatItems.Formats
|
|
{
|
|
/// <summary>
|
|
/// Represents one ListXML confsetting
|
|
/// </summary>
|
|
[JsonObject("confsetting"), XmlRoot("confsetting")]
|
|
public sealed class ConfSetting : DatItem<Models.Metadata.ConfSetting>
|
|
{
|
|
#region Fields
|
|
|
|
/// <inheritdoc>/>
|
|
protected override ItemType ItemType => ItemType.ConfSetting;
|
|
|
|
/// <inheritdoc>/>
|
|
protected override string? NameKey => Models.Metadata.ConfSetting.NameKey;
|
|
|
|
[JsonIgnore]
|
|
public bool ConditionsSpecified
|
|
{
|
|
get
|
|
{
|
|
var conditions = GetFieldValue<Condition[]?>(Models.Metadata.ConfSetting.ConditionKey);
|
|
return conditions != null && conditions.Length > 0;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Constructors
|
|
|
|
public ConfSetting() : base() { }
|
|
public ConfSetting(Models.Metadata.ConfSetting item) : base(item) { }
|
|
|
|
#endregion
|
|
}
|
|
}
|