mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Rebuilding to own class
This commit is contained in:
@@ -189,7 +189,7 @@ have a current entry in the DAT index.";
|
||||
}
|
||||
|
||||
// Create the sorting object to use and rebuild the needed files
|
||||
DatTool.RebuildGeneric(
|
||||
Rebuilder.RebuildGeneric(
|
||||
need,
|
||||
onlyDirs,
|
||||
outDir: _depots.Keys.ToList()[0],
|
||||
|
||||
@@ -64,7 +64,7 @@ structure according to the original DAT master directory tree structure.";
|
||||
List<string> onlineDepots = _depots.Where(d => d.Value.Item2).Select(d => d.Key).ToList();
|
||||
|
||||
// Now scan all of those depots and rebuild
|
||||
DatTool.RebuildDepot(
|
||||
Rebuilder.RebuildDepot(
|
||||
datFile,
|
||||
onlineDepots,
|
||||
outDir: outputFolder,
|
||||
|
||||
@@ -13,8 +13,17 @@ using SabreTools.Skippers;
|
||||
// This file represents all methods related to rebuilding from a DatFile
|
||||
namespace SabreTools.DatFiles
|
||||
{
|
||||
public partial class DatTool
|
||||
public class Rebuilder
|
||||
{
|
||||
#region Logging
|
||||
|
||||
/// <summary>
|
||||
/// Logging object
|
||||
/// </summary>
|
||||
private static readonly Logger logger = new Logger();
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Process the DAT and find all matches in input files and folders assuming they're a depot
|
||||
/// </summary>
|
||||
@@ -103,9 +103,9 @@ namespace SabreTools.Features
|
||||
// If we have the depot flag, respect it
|
||||
bool success;
|
||||
if (Header.InputDepot?.IsActive ?? false)
|
||||
success = DatTool.RebuildDepot(datdata, Inputs, Path.Combine(OutputDir, datdata.Header.FileName), date, delete, inverse, outputFormat);
|
||||
success = Rebuilder.RebuildDepot(datdata, Inputs, Path.Combine(OutputDir, datdata.Header.FileName), date, delete, inverse, outputFormat);
|
||||
else
|
||||
success = DatTool.RebuildGeneric(datdata, Inputs, Path.Combine(OutputDir, datdata.Header.FileName), quickScan, date, delete, inverse, outputFormat, asFiles);
|
||||
success = Rebuilder.RebuildGeneric(datdata, Inputs, Path.Combine(OutputDir, datdata.Header.FileName), quickScan, date, delete, inverse, outputFormat, asFiles);
|
||||
|
||||
// If we have a success and we're updating the DAT, write it out
|
||||
if (success && updateDat)
|
||||
@@ -144,9 +144,9 @@ namespace SabreTools.Features
|
||||
// If we have the depot flag, respect it
|
||||
bool success;
|
||||
if (Header.InputDepot?.IsActive ?? false)
|
||||
success = DatTool.RebuildDepot(datdata, Inputs, OutputDir, date, delete, inverse, outputFormat);
|
||||
success = Rebuilder.RebuildDepot(datdata, Inputs, OutputDir, date, delete, inverse, outputFormat);
|
||||
else
|
||||
success = DatTool.RebuildGeneric(datdata, Inputs, OutputDir, quickScan, date, delete, inverse, outputFormat, asFiles);
|
||||
success = Rebuilder.RebuildGeneric(datdata, Inputs, OutputDir, quickScan, date, delete, inverse, outputFormat, asFiles);
|
||||
|
||||
// If we have a success and we're updating the DAT, write it out
|
||||
if (success && updateDat)
|
||||
|
||||
Reference in New Issue
Block a user