mirror of
https://github.com/sp-tarkov/assembly-tool.git
synced 2025-02-13 03:30:44 -05:00
Fix namespaces
This commit is contained in:
parent
c66c44d166
commit
e7994691ee
@ -1,8 +1,8 @@
|
|||||||
using CliFx;
|
using CliFx;
|
||||||
using CliFx.Attributes;
|
using CliFx.Attributes;
|
||||||
using CliFx.Infrastructure;
|
using CliFx.Infrastructure;
|
||||||
using ReCodeIt.Utils;
|
using ReCodeItLib.Utils;
|
||||||
using ReCodeItLib.Remapper;
|
using ReCodeItLib.ReMapper;
|
||||||
|
|
||||||
namespace ReCodeItCLI.Commands;
|
namespace ReCodeItCLI.Commands;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using CliFx;
|
using CliFx;
|
||||||
using CliFx.Attributes;
|
using CliFx.Attributes;
|
||||||
using CliFx.Infrastructure;
|
using CliFx.Infrastructure;
|
||||||
using ReCodeIt.Utils;
|
using ReCodeItLib.Utils;
|
||||||
using ReCodeItLib.Dumper;
|
using ReCodeItLib.Dumper;
|
||||||
|
|
||||||
namespace ReCodeItCLI.Commands;
|
namespace ReCodeItCLI.Commands;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using CliFx;
|
using CliFx;
|
||||||
using CliFx.Attributes;
|
using CliFx.Attributes;
|
||||||
using CliFx.Infrastructure;
|
using CliFx.Infrastructure;
|
||||||
using ReCodeIt.ReMapper;
|
using ReCodeItLib.Utils;
|
||||||
using ReCodeIt.Utils;
|
using ReCodeItLib.ReMapper;
|
||||||
|
|
||||||
namespace ReCodeItCLI.Commands;
|
namespace ReCodeItCLI.Commands;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using ReCodeIt.Models;
|
using ReCodeItLib.Models;
|
||||||
using ReCodeIt.ReMapper;
|
using ReCodeItLib.ReMapper;
|
||||||
using ReCodeIt.Utils;
|
using ReCodeItLib.Utils;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace ReCodeIt.GUI;
|
namespace ReCodeIt.GUI;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
using Microsoft.Win32;
|
|
||||||
using ReCodeIt.GUI;
|
using ReCodeIt.GUI;
|
||||||
using ReCodeIt.Utils;
|
using ReCodeItLib.Utils;
|
||||||
|
|
||||||
namespace ReCodeIt;
|
namespace ReCodeIt;
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
using ReCodeIt.Models;
|
using ReCodeItLib.Models;
|
||||||
using ReCodeIt.Utils;
|
using ReCodeItLib.Utils;
|
||||||
|
|
||||||
namespace ReCodeIt.GUI;
|
namespace ReCodeIt.GUI;
|
||||||
|
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using dnlib.DotNet.Emit;
|
using dnlib.DotNet.Emit;
|
||||||
using ReCodeIt.Utils;
|
using ReCodeItLib.Utils;
|
||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
|
|
||||||
namespace ReCodeItLib.Dumper;
|
namespace ReCodeItLib.Dumper;
|
||||||
|
@ -1,13 +1,5 @@
|
|||||||
using System;
|
using dnlib.DotNet;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Reflection.Metadata;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using dnlib.DotNet;
|
|
||||||
using dnlib.DotNet.Emit;
|
using dnlib.DotNet.Emit;
|
||||||
using DumpLib;
|
|
||||||
using ReCodeIt.Utils;
|
|
||||||
|
|
||||||
namespace ReCodeItLib.Dumper;
|
namespace ReCodeItLib.Dumper;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace ReCodeIt.Enums;
|
namespace ReCodeItLib.Enums;
|
||||||
|
|
||||||
internal enum ELogLevel
|
internal enum ELogLevel
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace ReCodeIt.Enums;
|
namespace ReCodeItLib.Enums;
|
||||||
|
|
||||||
internal enum EMatchResult
|
internal enum EMatchResult
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace ReCodeIt.Enums;
|
namespace ReCodeItLib.Enums;
|
||||||
|
|
||||||
public enum ENoMatchReason
|
public enum ENoMatchReason
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using ReCodeIt.Utils;
|
using ReCodeItLib.Utils;
|
||||||
|
|
||||||
namespace ReCodeIt.Models;
|
namespace ReCodeItLib.Models;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// All settings container
|
/// All settings container
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace ReCodeIt.Models;
|
namespace ReCodeItLib.Models;
|
||||||
|
|
||||||
public class ItemTemplateModel
|
public class ItemTemplateModel
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using ReCodeIt.Enums;
|
using ReCodeItLib.Enums;
|
||||||
|
|
||||||
namespace ReCodeIt.Models;
|
namespace ReCodeItLib.Models;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Object to store linq statements in inside of json to search and remap classes
|
/// Object to store linq statements in inside of json to search and remap classes
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using dnlib.DotNet.Emit;
|
using dnlib.DotNet.Emit;
|
||||||
using ReCodeIt.Utils;
|
using ReCodeItLib.Utils;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using ReCodeIt.ReMapper;
|
|
||||||
|
|
||||||
namespace ReCodeItLib.Remapper;
|
namespace ReCodeItLib.ReMapper;
|
||||||
|
|
||||||
public static class Deobfuscator
|
public static class Deobfuscator
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using System.Runtime.CompilerServices;
|
using ReCodeItLib.Utils;
|
||||||
using ReCodeIt.Utils;
|
|
||||||
|
|
||||||
namespace ReCodeIt.ReMapper;
|
namespace ReCodeItLib.ReMapper;
|
||||||
|
|
||||||
internal static class SPTPublicizer
|
internal static class SPTPublicizer
|
||||||
{
|
{
|
||||||
|
@ -1,21 +1,16 @@
|
|||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using dnlib.DotNet.Emit;
|
using dnlib.DotNet.Emit;
|
||||||
using ReCodeIt.Enums;
|
using ReCodeItLib.Enums;
|
||||||
using ReCodeIt.Models;
|
using ReCodeItLib.Models;
|
||||||
using ReCodeIt.ReMapper.Search;
|
using ReCodeItLib.ReMapper.Search;
|
||||||
using ReCodeIt.Utils;
|
using ReCodeItLib.Utils;
|
||||||
using ReCodeItLib.Remapper.Search;
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using ReCodeItLib.Remapper;
|
|
||||||
|
|
||||||
namespace ReCodeIt.ReMapper;
|
namespace ReCodeItLib.ReMapper;
|
||||||
|
|
||||||
public class ReCodeItRemapper
|
public class ReCodeItRemapper
|
||||||
{
|
{
|
||||||
public ReCodeItRemapper()
|
|
||||||
{ }
|
|
||||||
|
|
||||||
private ModuleDefMD? Module { get; set; }
|
private ModuleDefMD? Module { get; set; }
|
||||||
|
|
||||||
public static bool IsRunning { get; private set; } = false;
|
public static bool IsRunning { get; private set; } = false;
|
||||||
@ -515,22 +510,20 @@ public class ReCodeItRemapper
|
|||||||
{
|
{
|
||||||
foreach (var type in table)
|
foreach (var type in table)
|
||||||
{
|
{
|
||||||
if (DataProvider.ItemTemplates!.TryGetValue(type.Key, out var template))
|
if (!DataProvider.ItemTemplates!.TryGetValue(type.Key, out var template) ||
|
||||||
|
!type.Value.Name.StartsWith("GClass"))
|
||||||
{
|
{
|
||||||
if (!type.Value.Name.StartsWith("GClass")) continue;
|
|
||||||
|
|
||||||
var remap = new RemapModel
|
|
||||||
{
|
|
||||||
OriginalTypeName = type.Value.Name,
|
|
||||||
NewTypeName = $"{template._name}{extName}",
|
|
||||||
UseForceRename = true
|
|
||||||
};
|
|
||||||
|
|
||||||
_remaps.Add(remap);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Logger.Log($"Found no association for key: {type.Key} Type: {type.Value}", ConsoleColor.Yellow);
|
var remap = new RemapModel
|
||||||
|
{
|
||||||
|
OriginalTypeName = type.Value.Name,
|
||||||
|
NewTypeName = $"{template._name}{extName}",
|
||||||
|
UseForceRename = true
|
||||||
|
};
|
||||||
|
|
||||||
|
_remaps.Add(remap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -596,11 +589,11 @@ public class ReCodeItRemapper
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Logger.Log(e);
|
Logger.LogSync(e);
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger.Log("\nCreating Hollow...", ConsoleColor.Yellow);
|
Logger.LogSync("\nCreating Hollow...", ConsoleColor.Green);
|
||||||
Hollow();
|
Hollow();
|
||||||
|
|
||||||
var hollowedDir = Path.GetDirectoryName(OutPath);
|
var hollowedDir = Path.GetDirectoryName(OutPath);
|
||||||
@ -612,7 +605,7 @@ public class ReCodeItRemapper
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Logger.Log(e);
|
Logger.LogSync(e);
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using ReCodeIt.Models;
|
using ReCodeItLib.Models;
|
||||||
using ReCodeIt.Utils;
|
using ReCodeItLib.Utils;
|
||||||
|
|
||||||
namespace ReCodeIt.ReMapper;
|
namespace ReCodeItLib.ReMapper;
|
||||||
|
|
||||||
internal static class RenameHelper
|
internal static class RenameHelper
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using ReCodeIt.Models;
|
using ReCodeItLib.Models;
|
||||||
|
|
||||||
namespace ReCodeIt.ReMapper.Search;
|
namespace ReCodeItLib.ReMapper.Search;
|
||||||
|
|
||||||
internal static class CtorTypeFilters
|
internal static class CtorTypeFilters
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using ReCodeIt.Models;
|
using ReCodeItLib.Models;
|
||||||
|
|
||||||
namespace ReCodeItLib.Remapper.Search;
|
namespace ReCodeItLib.ReMapper.Search;
|
||||||
|
|
||||||
internal static class EventTypeFilters
|
internal static class EventTypeFilters
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using ReCodeIt.Models;
|
using ReCodeItLib.Models;
|
||||||
using ReCodeIt.Utils;
|
|
||||||
|
|
||||||
namespace ReCodeItLib.Remapper.Search;
|
namespace ReCodeItLib.ReMapper.Search;
|
||||||
|
|
||||||
internal static class FieldTypeFilters
|
internal static class FieldTypeFilters
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using ReCodeIt.Models;
|
using ReCodeItLib.Models;
|
||||||
using ReCodeIt.Utils;
|
|
||||||
|
|
||||||
namespace ReCodeItLib.Remapper.Search;
|
namespace ReCodeItLib.ReMapper.Search;
|
||||||
|
|
||||||
internal static class GenericTypeFilters
|
internal static class GenericTypeFilters
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using ReCodeIt.Models;
|
using ReCodeItLib.Models;
|
||||||
using ReCodeIt.Utils;
|
|
||||||
|
|
||||||
namespace ReCodeItLib.Remapper.Search;
|
namespace ReCodeItLib.ReMapper.Search;
|
||||||
|
|
||||||
internal static class MethodTypeFilters
|
internal static class MethodTypeFilters
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using ReCodeIt.Models;
|
using ReCodeItLib.Models;
|
||||||
|
|
||||||
namespace ReCodeIt.ReMapper.Search;
|
namespace ReCodeItLib.ReMapper.Search;
|
||||||
|
|
||||||
internal static class NestedTypeFilters
|
internal static class NestedTypeFilters
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using ReCodeIt.Models;
|
using ReCodeItLib.Models;
|
||||||
using ReCodeIt.Utils;
|
|
||||||
|
|
||||||
namespace ReCodeItLib.Remapper.Search;
|
namespace ReCodeItLib.ReMapper.Search;
|
||||||
|
|
||||||
internal static class PropertyTypeFilters
|
internal static class PropertyTypeFilters
|
||||||
{
|
{
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using ReCodeIt.Enums;
|
using ReCodeItLib.Enums;
|
||||||
using ReCodeIt.Models;
|
using ReCodeItLib.Models;
|
||||||
using ReCodeIt.Utils;
|
using ReCodeItLib.Utils;
|
||||||
|
|
||||||
namespace ReCodeItLib.Remapper;
|
namespace ReCodeItLib.ReMapper;
|
||||||
|
|
||||||
public class Statistics(
|
public class Statistics(
|
||||||
List<RemapModel> remapModels,
|
List<RemapModel> remapModels,
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using ReCodeIt.Models;
|
using ReCodeItLib.Models;
|
||||||
using ReCodeItLib.Dumper;
|
using ReCodeItLib.Dumper;
|
||||||
|
|
||||||
namespace ReCodeIt.Utils;
|
namespace ReCodeItLib.Utils;
|
||||||
|
|
||||||
public static class DataProvider
|
public static class DataProvider
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
|
|
||||||
namespace ReCodeIt.Utils;
|
namespace ReCodeItLib.Utils;
|
||||||
|
|
||||||
internal static class HashUtil
|
internal static class HashUtil
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
|
|
||||||
namespace ReCodeIt.Utils;
|
namespace ReCodeItLib.Utils;
|
||||||
|
|
||||||
public static class Logger
|
public static class Logger
|
||||||
{
|
{
|
||||||
@ -112,7 +112,7 @@ public static class Logger
|
|||||||
_messages.Enqueue(new LogMessage {Message = message, Color = color, Silent = silent, ThreadId = Thread.CurrentThread.ManagedThreadId});
|
_messages.Enqueue(new LogMessage {Message = message, Color = color, Silent = silent, ThreadId = Thread.CurrentThread.ManagedThreadId});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void LogSync(string message, ConsoleColor color = ConsoleColor.White)
|
public static void LogSync(object message, ConsoleColor color = ConsoleColor.White)
|
||||||
{
|
{
|
||||||
Console.ForegroundColor = color;
|
Console.ForegroundColor = color;
|
||||||
Console.WriteLine(message);
|
Console.WriteLine(message);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace ReCodeIt.Utils;
|
namespace ReCodeItLib.Utils;
|
||||||
|
|
||||||
public static class SysTypeExtentions
|
public static class SysTypeExtentions
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user