Make it an against flag instead

This commit is contained in:
Matt Nadareski
2020-08-01 15:10:41 -07:00
parent 7f150a3536
commit 002e55e86e
5 changed files with 29 additions and 37 deletions

View File

@@ -98,6 +98,20 @@ namespace SabreTools.Features
}
}
internal const string ByGameValue = "by-game";
internal static Feature ByGameFlag
{
get
{
return new Feature(
BaseReplaceValue,
new List<string>() { "-bg", "--by-game" },
"Diff against by game instead of hashes",
FeatureType.Flag,
longDescription: "By default, diffing against uses hashes to determine similar files. This flag enables using using each game as a comparision point instead.");
}
}
internal const string ChdsAsFilesValue = "chds-as-files";
internal static Feature ChdsAsFilesFlag
{
@@ -336,20 +350,6 @@ namespace SabreTools.Features
}
}
internal const string DiffGameValue = "diff-game";
internal static Feature DiffGameFlag
{
get
{
return new Feature(
DiffAgainstValue,
new List<string>() { "-dga", "--diff-game" },
"Diff all inputs by game against a set of base DATs",
FeatureType.Flag,
"This flag will enable a special type of diffing in which a set of base DATs are used as a comparison point for each of the input DATs by game. This allows users to get a slightly different output to cascaded diffing, which may be more useful in some cases.");
}
}
internal const string DiffIndividualsValue = "diff-individuals";
internal static Feature DiffIndividualsFlag
{
@@ -2503,9 +2503,6 @@ Some special strings that can be used:
if (GetBoolean(features, DiffDuplicatesValue))
updateMode |= UpdateMode.DiffDupesOnly;
if (GetBoolean(features, DiffGameValue))
updateMode |= UpdateMode.DiffGame;
if (GetBoolean(features, DiffIndividualsValue))
updateMode |= UpdateMode.DiffIndividualsOnly;

View File

@@ -56,8 +56,7 @@ namespace SabreTools.Features
this[DiffNoDuplicatesFlag].AddFeature(NoAutomaticDateFlag);
AddFeature(DiffAgainstFlag);
this[DiffAgainstFlag].AddFeature(BaseDatListInput);
AddFeature(DiffGameFlag);
this[DiffGameFlag].AddFeature(BaseDatListInput);
this[DiffAgainstFlag].AddFeature(ByGameFlag);
AddFeature(BaseReplaceFlag);
this[BaseReplaceFlag].AddFeature(BaseDatListInput);
this[BaseReplaceFlag].AddFeature(UpdateFieldListInput);
@@ -155,7 +154,8 @@ namespace SabreTools.Features
GetBoolean(features, SkipFirstOutputValue),
Filter,
updateFields,
GetBoolean(features, OnlySameValue));
GetBoolean(features, OnlySameValue),
GetBoolean(Features, ByGameValue));
}
}
}