mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-04-19 12:43:17 +00:00
39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
using System.Xml.Serialization;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace SabreTools.Metadata.DatItems.Formats
|
|
{
|
|
/// <summary>
|
|
/// Represents the sound output for a machine
|
|
/// </summary>
|
|
[JsonObject("sound"), XmlRoot("sound")]
|
|
public sealed class Sound : DatItem<Data.Models.Metadata.Sound>
|
|
{
|
|
#region Fields
|
|
|
|
/// <inheritdoc>/>
|
|
protected override ItemType ItemType => ItemType.Sound;
|
|
|
|
#endregion
|
|
|
|
#region Constructors
|
|
|
|
public Sound() : base() { }
|
|
|
|
public Sound(Data.Models.Metadata.Sound item) : base(item)
|
|
{
|
|
// Process flag values
|
|
if (GetInt64FieldValue(Data.Models.Metadata.Sound.ChannelsKey) is not null)
|
|
SetFieldValue<string?>(Data.Models.Metadata.Sound.ChannelsKey, GetInt64FieldValue(Data.Models.Metadata.Sound.ChannelsKey).ToString());
|
|
}
|
|
|
|
public Sound(Data.Models.Metadata.Sound item, Machine machine, Source source) : this(item)
|
|
{
|
|
SetFieldValue<Source?>(SourceKey, source);
|
|
CopyMachineInformation(machine);
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|