2023-08-14 13:17:51 -04:00
|
|
|
using System.Xml.Serialization;
|
|
|
|
|
using Newtonsoft.Json;
|
2025-01-11 22:00:26 -05:00
|
|
|
using SabreTools.Core.Tools;
|
2023-08-14 13:17:51 -04:00
|
|
|
|
|
|
|
|
namespace SabreTools.DatItems.Formats
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Represents one conflocation
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonObject("conflocation"), XmlRoot("conflocation")]
|
2024-03-10 20:39:54 -04:00
|
|
|
public sealed class ConfLocation : DatItem<Models.Metadata.ConfLocation>
|
2023-08-14 13:17:51 -04:00
|
|
|
{
|
2024-03-10 20:39:54 -04:00
|
|
|
#region Fields
|
2023-08-14 13:17:51 -04:00
|
|
|
|
2024-03-10 20:39:54 -04:00
|
|
|
/// <inheritdoc>/>
|
|
|
|
|
protected override ItemType ItemType => ItemType.ConfLocation;
|
2023-08-14 13:17:51 -04:00
|
|
|
|
2024-03-10 20:39:54 -04:00
|
|
|
/// <inheritdoc>/>
|
|
|
|
|
protected override string? NameKey => Models.Metadata.ConfLocation.NameKey;
|
2023-08-14 13:17:51 -04:00
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Constructors
|
|
|
|
|
|
2024-03-10 20:39:54 -04:00
|
|
|
public ConfLocation() : base() { }
|
2025-01-11 22:00:26 -05:00
|
|
|
public ConfLocation(Models.Metadata.ConfLocation item) : base(item)
|
|
|
|
|
{
|
|
|
|
|
// Process flag values
|
|
|
|
|
if (GetBoolFieldValue(Models.Metadata.ConfLocation.InvertedKey) != null)
|
|
|
|
|
SetFieldValue<string?>(Models.Metadata.ConfLocation.InvertedKey, GetBoolFieldValue(Models.Metadata.ConfLocation.InvertedKey).FromYesNo());
|
|
|
|
|
}
|
2023-08-14 13:17:51 -04:00
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|