mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Use OfflineList serializer for reading only
This commit is contained in:
@@ -27,8 +27,24 @@ namespace SabreTools.DatFiles.Formats
|
||||
/// <inheritdoc/>
|
||||
protected override List<DatItemField> GetMissingRequiredFields(DatItem datItem)
|
||||
{
|
||||
// TODO: Check required fields
|
||||
return null;
|
||||
var missingFields = new List<DatItemField>();
|
||||
|
||||
if (string.IsNullOrWhiteSpace(datItem.GetName()))
|
||||
missingFields.Add(DatItemField.Name);
|
||||
|
||||
switch (datItem)
|
||||
{
|
||||
case Rom rom:
|
||||
if (rom.Size == null || rom.Size < 0)
|
||||
missingFields.Add(DatItemField.Size);
|
||||
if (string.IsNullOrWhiteSpace(rom.CRC))
|
||||
{
|
||||
missingFields.Add(DatItemField.SHA1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return missingFields;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
||||
Reference in New Issue
Block a user