0
0
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:
Cj 2024-12-31 13:46:44 -05:00
parent c66c44d166
commit e7994691ee
30 changed files with 70 additions and 93 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -1,6 +1,5 @@
using Microsoft.Win32;
using ReCodeIt.GUI; using ReCodeIt.GUI;
using ReCodeIt.Utils; using ReCodeItLib.Utils;
namespace ReCodeIt; namespace ReCodeIt;

View File

@ -1,5 +1,5 @@
using ReCodeIt.Models; using ReCodeItLib.Models;
using ReCodeIt.Utils; using ReCodeItLib.Utils;
namespace ReCodeIt.GUI; namespace ReCodeIt.GUI;

View File

@ -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;

View File

@ -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;

View File

@ -1,4 +1,4 @@
namespace ReCodeIt.Enums; namespace ReCodeItLib.Enums;
internal enum ELogLevel internal enum ELogLevel
{ {

View File

@ -1,4 +1,4 @@
namespace ReCodeIt.Enums; namespace ReCodeItLib.Enums;
internal enum EMatchResult internal enum EMatchResult
{ {

View File

@ -1,4 +1,4 @@
namespace ReCodeIt.Enums; namespace ReCodeItLib.Enums;
public enum ENoMatchReason public enum ENoMatchReason
{ {

View File

@ -1,6 +1,6 @@
using ReCodeIt.Utils; using ReCodeItLib.Utils;
namespace ReCodeIt.Models; namespace ReCodeItLib.Models;
/// <summary> /// <summary>
/// All settings container /// All settings container

View File

@ -1,4 +1,4 @@
namespace ReCodeIt.Models; namespace ReCodeItLib.Models;
public class ItemTemplateModel public class ItemTemplateModel
{ {

View File

@ -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

View File

@ -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
{ {

View File

@ -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
{ {

View File

@ -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;
} }

View File

@ -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
{ {

View File

@ -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
{ {

View File

@ -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
{ {

View File

@ -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
{ {

View File

@ -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
{ {

View File

@ -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
{ {

View File

@ -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
{ {

View File

@ -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
{ {

View File

@ -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,

View File

@ -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
{ {

View File

@ -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
{ {

View File

@ -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);

View File

@ -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
{ {