Files
SabreTools/SabreTools.DatItems/Formats/Sound.cs
2025-01-11 22:00:26 -05:00

35 lines
946 B
C#

using System.Xml.Serialization;
using Newtonsoft.Json;
namespace SabreTools.DatItems.Formats
{
/// <summary>
/// Represents the sound output for a machine
/// </summary>
[JsonObject("sound"), XmlRoot("sound")]
public sealed class Sound : DatItem<Models.Metadata.Sound>
{
#region Fields
/// <inheritdoc>/>
protected override ItemType ItemType => ItemType.Sound;
/// <inheritdoc>/>
protected override string? NameKey => null;
#endregion
#region Constructors
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());
}
#endregion
}
}