Implement module patch abstraction and patch loader (#250)
* Implement patch abstractions and patch loader using an interface * remove patch loader * rename patch class
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
using System.Reflection;
|
||||
using HarmonyLib;
|
||||
using SPTarkov.Server.Core.Utils;
|
||||
|
||||
namespace SPTarkov.Server.Modding;
|
||||
|
||||
public class HarmonyBootstrapper
|
||||
{
|
||||
public static void LoadAllPatches(List<Assembly> assemblies)
|
||||
{
|
||||
if (!ProgramStatics.MODS())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var hamony = new Harmony("SPT");
|
||||
foreach (var assembly in assemblies)
|
||||
{
|
||||
try
|
||||
{
|
||||
hamony.PatchAll(assembly);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user