Create and use Cleaner

This commit is contained in:
Matt Nadareski
2020-08-28 13:33:05 -07:00
parent 4e49dad4b7
commit 27bbc9df29
10 changed files with 258 additions and 256 deletions

View File

@@ -267,42 +267,6 @@ namespace SabreTools.Library.DatFiles
#region Filtering Fields
/// <summary>
/// Dictionary of fields in machine and items to exclude from writing
/// </summary>
[JsonIgnore]
public List<Field> ExcludeFields { get; set; } = new List<Field>();
/// <summary>
/// Enable "One Rom, One Region (1G1R)" mode
/// </summary>
[JsonIgnore]
public bool OneGamePerRegion { get; set; }
/// <summary>
/// Ordered list of regions for "One Rom, One Region (1G1R)" mode
/// </summary>
[JsonIgnore]
public List<string> RegionList { get; set; }
/// <summary>
/// Ensure each rom is in their own game
/// </summary>
[JsonIgnore]
public bool OneRomPerGame { get; set; }
/// <summary>
/// Keep machines that don't contain any items
/// </summary>
[JsonIgnore]
public bool KeepEmptyGames { get; set; }
/// <summary>
/// Remove scene dates from the beginning of machine names
/// </summary>
[JsonIgnore]
public bool SceneDateStrip { get; set; }
/// <summary>
/// Deduplicate items using the given method
/// </summary>
@@ -315,7 +279,6 @@ namespace SabreTools.Library.DatFiles
[JsonIgnore]
public Hash StripHash { get; private set; }
#endregion
#region Write pre-processing
@@ -538,12 +501,6 @@ namespace SabreTools.Library.DatFiles
ForceNodump = this.ForceNodump,
ForcePacking = this.ForcePacking,
DatFormat = this.DatFormat,
ExcludeFields = this.ExcludeFields,
OneGamePerRegion = this.OneGamePerRegion,
RegionList = this.RegionList,
OneRomPerGame = this.OneRomPerGame,
KeepEmptyGames = this.KeepEmptyGames,
SceneDateStrip = this.SceneDateStrip,
DedupeRoms = this.DedupeRoms,
StripHash = this.StripHash,
@@ -585,12 +542,6 @@ namespace SabreTools.Library.DatFiles
ForceNodump = this.ForceNodump,
ForcePacking = this.ForcePacking,
DatFormat = this.DatFormat,
ExcludeFields = this.ExcludeFields,
OneGamePerRegion = this.OneGamePerRegion,
RegionList = this.RegionList,
OneRomPerGame = this.OneRomPerGame,
KeepEmptyGames = this.KeepEmptyGames,
SceneDateStrip = this.SceneDateStrip,
DedupeRoms = this.DedupeRoms,
StripHash = this.StripHash,
};
@@ -604,10 +555,6 @@ namespace SabreTools.Library.DatFiles
return new DatHeader()
{
DatFormat = this.DatFormat,
ExcludeFields = this.ExcludeFields,
OneRomPerGame = this.OneRomPerGame,
KeepEmptyGames = this.KeepEmptyGames,
SceneDateStrip = this.SceneDateStrip,
DedupeRoms = this.DedupeRoms,
StripHash = this.StripHash,
@@ -684,12 +631,6 @@ namespace SabreTools.Library.DatFiles
if (datHeader.DatFormat != 0x00)
DatFormat = datHeader.DatFormat;
if (datHeader.ExcludeFields != null)
ExcludeFields = datHeader.ExcludeFields;
OneRomPerGame = datHeader.OneRomPerGame;
KeepEmptyGames = datHeader.KeepEmptyGames;
SceneDateStrip = datHeader.SceneDateStrip;
DedupeRoms = datHeader.DedupeRoms;
//StripHash = datHeader.StripHash;