2020-08-01 13:25:32 -07:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
2020-12-07 12:33:24 -08:00
|
|
|
|
using SabreTools.Data;
|
2020-12-07 13:57:26 -08:00
|
|
|
|
using SabreTools.Help;
|
2020-12-07 15:08:57 -08:00
|
|
|
|
using SabreTools.IO;
|
2020-08-01 13:25:32 -07:00
|
|
|
|
using SabreTools.Library.DatFiles;
|
|
|
|
|
|
|
|
|
|
|
|
namespace RombaSharp.Features
|
|
|
|
|
|
{
|
|
|
|
|
|
internal class Miss : BaseFeature
|
|
|
|
|
|
{
|
|
|
|
|
|
public const string Value = "Miss";
|
|
|
|
|
|
|
|
|
|
|
|
// Unique to RombaSharp
|
|
|
|
|
|
public Miss()
|
|
|
|
|
|
{
|
|
|
|
|
|
Name = Value;
|
|
|
|
|
|
Flags = new List<string>() { "miss" };
|
|
|
|
|
|
Description = "Create miss and have file";
|
2020-12-07 13:57:26 -08:00
|
|
|
|
_featureType = ParameterType.Flag;
|
2020-08-01 13:25:32 -07:00
|
|
|
|
LongDescription = "For each specified DAT file, create miss and have file";
|
|
|
|
|
|
Features = new Dictionary<string, Feature>();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override void ProcessFeatures(Dictionary<string, Feature> features)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.ProcessFeatures(features);
|
|
|
|
|
|
|
|
|
|
|
|
// Verify the filenames
|
|
|
|
|
|
Dictionary<string, string> foundDats = GetValidDats(Inputs);
|
|
|
|
|
|
|
|
|
|
|
|
// Create the new output directory if it doesn't exist
|
|
|
|
|
|
DirectoryExtensions.Ensure(Path.Combine(Globals.ExeDir, "out"), create: true);
|
|
|
|
|
|
|
|
|
|
|
|
// Now that we have the dictionary, we can loop through and output to a new folder for each
|
|
|
|
|
|
foreach (string key in foundDats.Keys)
|
|
|
|
|
|
{
|
|
|
|
|
|
// Get the DAT file associated with the key
|
|
|
|
|
|
DatFile datFile = DatFile.CreateAndParse(Path.Combine(_dats, foundDats[key]));
|
|
|
|
|
|
|
|
|
|
|
|
// Now loop through and see if all of the hash combinations exist in the database
|
|
|
|
|
|
/* ended here */
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-10-07 15:42:30 -07:00
|
|
|
|
logger.Error("This feature is not yet implemented: miss");
|
2020-08-01 13:25:32 -07:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|