Files
SabreTools/SabreTools.DatItems/Formats/Sound.cs

36 lines
947 B
C#
Raw Normal View History

using System.Xml.Serialization;
2020-09-02 12:51:21 -07:00
using Newtonsoft.Json;
2021-02-02 10:23:43 -08:00
namespace SabreTools.DatItems.Formats
2020-09-02 12:51:21 -07:00
{
/// <summary>
/// Represents the sound output for a machine
/// </summary>
2020-09-08 10:12:41 -07:00
[JsonObject("sound"), XmlRoot("sound")]
2024-03-10 20:39:54 -04:00
public sealed class Sound : DatItem<Models.Metadata.Sound>
2020-09-02 12:51:21 -07:00
{
2024-03-10 20:39:54 -04:00
#region Fields
2023-08-15 01:38:01 -04:00
2024-03-10 20:39:54 -04:00
/// <inheritdoc>/>
protected override ItemType ItemType => ItemType.Sound;
2020-09-02 12:51:21 -07:00
2024-03-10 20:39:54 -04:00
/// <inheritdoc>/>
protected override string? NameKey => null;
2024-03-09 21:46:38 -05:00
2020-09-02 12:51:21 -07:00
#endregion
2024-03-10 20:39:54 -04:00
#region Constructors
2020-09-02 12:51:21 -07:00
2024-03-10 20:39:54 -04:00
public Sound() : base() { }
public Sound(Models.Metadata.Sound item) : base(item)
{
// Process flag values
if (GetInt64FieldValue(Models.Metadata.Sound.ChannelsKey) != null)
SetFieldValue<string?>(Models.Metadata.Sound.ChannelsKey, GetInt64FieldValue(Models.Metadata.Sound.ChannelsKey).ToString());
}
2020-09-02 12:51:21 -07:00
#endregion
}
}