2024-03-12 19:54:43 -04:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using SabreTools.DatItems;
|
|
|
|
|
|
|
|
|
|
|
|
namespace SabreTools.DatFiles.Formats
|
2017-10-09 18:04:49 -07:00
|
|
|
|
{
|
2019-01-11 13:43:15 -08:00
|
|
|
|
/// <summary>
|
2023-07-29 00:06:31 -04:00
|
|
|
|
/// Represents an AttractMode DAT
|
2019-01-11 13:43:15 -08:00
|
|
|
|
/// </summary>
|
2024-04-24 13:45:38 -04:00
|
|
|
|
internal sealed class AttractMode : SerializableDatFile<Models.AttractMode.MetadataFile, Serialization.Deserializers.AttractMode, Serialization.Serializers.AttractMode, Serialization.CrossModel.AttractMode>
|
2019-01-11 13:43:15 -08:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Constructor designed for casting a base DatFile
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="datFile">Parent DatFile to copy from</param>
|
2024-10-24 04:48:21 -04:00
|
|
|
|
public AttractMode(DatFile? datFile) : base(datFile)
|
2019-01-11 13:43:15 -08:00
|
|
|
|
{
|
|
|
|
|
|
}
|
2024-03-12 19:54:43 -04:00
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
|
|
protected override ItemType[] GetSupportedTypes()
|
|
|
|
|
|
{
|
|
|
|
|
|
return
|
|
|
|
|
|
[
|
|
|
|
|
|
ItemType.Rom
|
|
|
|
|
|
];
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
|
|
protected override List<string>? GetMissingRequiredFields(DatItem datItem)
|
|
|
|
|
|
{
|
2024-12-06 23:16:09 -05:00
|
|
|
|
List<string> missingFields = [];
|
2024-03-12 19:54:43 -04:00
|
|
|
|
|
|
|
|
|
|
// Check item name
|
|
|
|
|
|
if (string.IsNullOrEmpty(datItem.GetName()))
|
|
|
|
|
|
missingFields.Add(Models.Metadata.Rom.NameKey);
|
|
|
|
|
|
|
|
|
|
|
|
return missingFields;
|
|
|
|
|
|
}
|
2019-01-11 13:43:15 -08:00
|
|
|
|
}
|
2017-10-09 18:04:49 -07:00
|
|
|
|
}
|