diff --git a/SabreTools.DatFiles/DatHeader.cs b/SabreTools.DatFiles/DatHeader.cs index a832cef6..6ec1d418 100644 --- a/SabreTools.DatFiles/DatHeader.cs +++ b/SabreTools.DatFiles/DatHeader.cs @@ -151,6 +151,18 @@ namespace SabreTools.DatFiles if (header.ContainsKey(fieldName)) _internal[fieldName] = header[fieldName]; } + + // Get all fields specific to the DatFiles implementation + var nonStandardFields = TypeHelper.GetConstants(typeof(DatHeader)); + if (nonStandardFields == null) + return; + + // Populate the internal machine from filter fields + foreach (string fieldName in nonStandardFields) + { + if (header.ContainsKey(fieldName)) + _internal[fieldName] = header[fieldName]; + } } #endregion