Remove residual code from unused component

This commit is contained in:
Cj 2024-08-10 07:31:12 -04:00
parent 4bab2015f0
commit cf064e041b

View File

@ -28,10 +28,6 @@ public class ReCodeItRemapper
private string OutPath { get; set; } = string.Empty;
private bool CrossMapMode { get; set; } = false;
private string AssemblyPath { get; set; }
private List<RemapModel> _remaps = [];
private List<string> _alreadyGivenNames = [];
@ -43,16 +39,12 @@ public class ReCodeItRemapper
List<RemapModel> remapModels,
string assemblyPath,
string outPath,
bool crossMapMode = false,
bool validate = false)
{
_remaps = [];
_remaps = remapModels;
Module = DataProvider.LoadModule(assemblyPath);
AssemblyPath = assemblyPath;
CrossMapMode = crossMapMode;
OutPath = outPath;
if (!Validate(_remaps)) return;
@ -458,11 +450,7 @@ public class ReCodeItRemapper
{
var moduleName = Module.Name;
moduleName = CrossMapMode
? moduleName
: moduleName.Replace(".dll", "-Remapped.dll");
OutPath = Path.Combine(OutPath, moduleName);
OutPath = Path.Combine(OutPath, moduleName.Replace(".dll", "-Remapped.dll"));
try
{
@ -474,17 +462,23 @@ public class ReCodeItRemapper
throw;
}
if (!CrossMapMode)
{
Logger.Log("Creating Hollow...", ConsoleColor.Yellow);
Hollow();
var hollowedDir = Path.GetDirectoryName(OutPath);
var hollowedPath = Path.Combine(hollowedDir, "Hollowed.dll");
try
{
Module.Write(hollowedPath);
}
catch (Exception e)
{
Logger.Log(e);
throw;
}
DisplayEndBanner(hollowedPath);
}
if (DataProvider.Settings.Remapper.MappingPath != string.Empty)
{