Fix all reading of enum values from internal models

This commit is contained in:
Matt Nadareski
2024-03-11 21:30:24 -04:00
parent 1c8575adaf
commit fe6d135dfb
12 changed files with 104 additions and 100 deletions

View File

@@ -1,8 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using SabreTools.Core;
using SabreTools.Core.Tools;
using SabreTools.DatFiles;
using SabreTools.DatItems;
using SabreTools.DatItems.Formats;
@@ -53,7 +53,7 @@ namespace SabreTools.Filtering
{
// If we are using tags from the DAT, set the proper input for split type unless overridden
if (useTags && SplitType == MergingFlag.None)
SplitType = datFile.Header.GetFieldValue<MergingFlag>(Models.Metadata.Header.ForceMergingKey);
SplitType = datFile.Header.GetStringFieldValue(Models.Metadata.Header.ForceMergingKey).AsEnumValue<MergingFlag>();
// Run internal splitting
switch (SplitType)