diff --git a/SabreTools.Library/DatFiles/DatFile.cs b/SabreTools.Library/DatFiles/DatFile.cs index fff44b42..c41ab66f 100644 --- a/SabreTools.Library/DatFiles/DatFile.cs +++ b/SabreTools.Library/DatFiles/DatFile.cs @@ -1659,14 +1659,14 @@ namespace SabreTools.Library.DatFiles { // Populate the combined data and get the headers List datHeaders = PopulateUserData(inputFileNames, inplace, clean, remUnicode, descAsName, outDir, filter, splitType); - MergeNoDiff(outDir, inputFileNames, datHeaders); + MergeNoDiff(inputFileNames, datHeaders, outDir); } // If we have one of the standard diffing modes else if ((updateMode & UpdateMode.DiffDupesOnly) != 0 || (updateMode & UpdateMode.DiffNoDupesOnly) != 0 || (updateMode & UpdateMode.DiffIndividualsOnly) != 0) { - DiffNoCascade(updateMode, outDir, inputFileNames); + DiffNoCascade(inputFileNames, outDir, filter, updateMode); } // If we have one of the cascaded diffing modes else if ((updateMode & UpdateMode.DiffCascade) != 0 @@ -1674,7 +1674,7 @@ namespace SabreTools.Library.DatFiles { // Populate the combined data and get the headers List datHeaders = PopulateUserData(inputFileNames, inplace, clean, remUnicode, descAsName, outDir, filter, splitType); - DiffCascade(outDir, inplace, inputFileNames, datHeaders, skip); + DiffCascade(inputFileNames, datHeaders, outDir, inplace, skip); } // If we have diff against mode else if ((updateMode & UpdateMode.DiffAgainst) != 0) @@ -2038,12 +2038,12 @@ namespace SabreTools.Library.DatFiles /// /// Output cascading diffs /// - /// Output directory to write the DATs to - /// True if cascaded diffs are outputted in-place, false otherwise /// List of inputs to write out from /// Dat headers used optionally + /// Output directory to write the DATs to + /// True if cascaded diffs are outputted in-place, false otherwise /// True if the first cascaded diff file should be skipped on output, false otherwise - public void DiffCascade(string outDir, bool inplace, List inputs, List datHeaders, bool skip) + public void DiffCascade(List inputs, List datHeaders, string outDir, bool inplace, bool skip) { string post = ""; @@ -2129,10 +2129,11 @@ namespace SabreTools.Library.DatFiles /// /// Output non-cascading diffs /// - /// Non-zero flag for diffing mode, zero otherwise - /// Output directory to write the DATs to /// List of inputs to write out from - public void DiffNoCascade(UpdateMode diff, string outDir, List inputs) + /// Output directory to write the DATs to + /// Filter object to be passed to the DatItem level + /// Non-zero flag for diffing mode, zero otherwise + public void DiffNoCascade(List inputs, string outDir, Filter filter, UpdateMode diff) { InternalStopwatch watch = new InternalStopwatch("Initializing all output DATs"); @@ -2155,6 +2156,9 @@ namespace SabreTools.Library.DatFiles Parse(path, id, id, keep: true); }); + // Now that we have a combined DAT, filter it + filter.FilterDatFile(this); + // Fill in any information not in the base DAT if (String.IsNullOrWhiteSpace(FileName)) { @@ -2303,10 +2307,10 @@ namespace SabreTools.Library.DatFiles /// /// Output user defined merge /// - /// Output directory to write the DATs to /// List of inputs to write out from /// Dat headers used optionally - public void MergeNoDiff(string outDir, List inputs, List datHeaders) + /// Output directory to write the DATs to + public void MergeNoDiff(List inputs, List datHeaders, string outDir) { // If we're in SuperDAT mode, prefix all games with their respective DATs if (Type == "SuperDAT")