Merge branch 'master' of https://dev.sp-tarkov.com/SPT/AssemblyTool into Dump-DnLib-Conversion
This commit is contained in:
commit
7c0575d423
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user