From c4d6aa83b3a41a891a6099faa8cd64ca178370fe Mon Sep 17 00:00:00 2001 From: Archangel Date: Fri, 14 Feb 2025 00:46:48 +0100 Subject: [PATCH] Enable Harmony bootstrapper --- Server/HarmonyBootstrapper.cs | 3 +-- Server/Program.cs | 2 +- Server/Server.csproj | 29 +++++++++++++++-------------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Server/HarmonyBootstrapper.cs b/Server/HarmonyBootstrapper.cs index db8d20c3..819ded3f 100644 --- a/Server/HarmonyBootstrapper.cs +++ b/Server/HarmonyBootstrapper.cs @@ -1,4 +1,5 @@ using System.Reflection; +using HarmonyLib; namespace Server; @@ -6,7 +7,6 @@ public class HarmonyBootstrapper { public static void LoadAllPatches(List assemblies) { - /* TODO: Benched idea until someone can figure out how to make Harmony work on net9.0 runtime if even possible? var hamony = new Harmony("SPT"); foreach (var assembly in assemblies) { @@ -19,6 +19,5 @@ public class HarmonyBootstrapper Console.WriteLine(e); } } - */ } } diff --git a/Server/Program.cs b/Server/Program.cs index 020fc0c8..84f69afd 100644 --- a/Server/Program.cs +++ b/Server/Program.cs @@ -17,7 +17,7 @@ public static class Program public static void Main(string[] args) { var mods = ModDllLoader.LoadAllMods(); - // HarmonyBootstrapper.LoadAllPatches(assemblies); + HarmonyBootstrapper.LoadAllPatches(mods.Select(asm => asm.Assembly).ToList()); var builder = WebApplication.CreateBuilder(args); builder.Host.UseSerilog(); diff --git a/Server/Server.csproj b/Server/Server.csproj index 70c98a64..40536f93 100644 --- a/Server/Server.csproj +++ b/Server/Server.csproj @@ -1,4 +1,4 @@ - + true @@ -10,28 +10,29 @@ - - + + - - - - - - - - - - + + + + + + + + + + + PreserveNewest - + Always