Convert DAT type to a key

This commit is contained in:
Matt Nadareski
2024-03-10 21:54:07 -04:00
parent 8ef1ba6293
commit 1d1cbc3357
9 changed files with 93 additions and 101 deletions

View File

@@ -58,10 +58,10 @@ namespace SabreTools.DatTools
InternalStopwatch watch = new($"Writing out internal dat to '{outDir}'");
// If the DAT has no output format, default to XML
if (datFile.Header.DatFormat == 0)
if (datFile.Header.GetFieldValue<DatFormat>(DatHeader.DatFormatKey) == 0)
{
logger.Verbose("No DAT format defined, defaulting to XML");
datFile.Header.DatFormat = DatFormat.Logiqx;
datFile.Header.SetFieldValue<DatFormat>(DatHeader.DatFormatKey, DatFormat.Logiqx);
}
// Make sure that the three essential fields are filled in