diff --git a/GamecraftModdingAPI/Blocks/BlockIdentifiers.cs b/GamecraftModdingAPI/Blocks/BlockIdentifiers.cs
index 6da100d..60819fe 100644
--- a/GamecraftModdingAPI/Blocks/BlockIdentifiers.cs
+++ b/GamecraftModdingAPI/Blocks/BlockIdentifiers.cs
@@ -8,7 +8,7 @@ using System.Reflection;
using Svelto.ECS;
using RobocraftX.Common;
-using Harmony;
+using HarmonyLib;
namespace GamecraftModdingAPI.Blocks
{
diff --git a/GamecraftModdingAPI/Blocks/PlacementEngine.cs b/GamecraftModdingAPI/Blocks/PlacementEngine.cs
index d352fe4..d954940 100644
--- a/GamecraftModdingAPI/Blocks/PlacementEngine.cs
+++ b/GamecraftModdingAPI/Blocks/PlacementEngine.cs
@@ -2,7 +2,7 @@ using System;
using System.Reflection;
using DataLoader;
-using Harmony;
+using HarmonyLib;
using RobocraftX.Blocks;
using RobocraftX.Blocks.Ghost;
using RobocraftX.Blocks.Scaling;
@@ -137,7 +137,7 @@ namespace GamecraftModdingAPI.Blocks
Logging.MetaDebugLog("Block entity factory injected.");
}
- static MethodBase TargetMethod(HarmonyInstance instance)
+ static MethodBase TargetMethod(Harmony instance)
{
return AccessTools.TypeByName("RobocraftX.CR.MachineEditing.PlaceBlockEngine").GetConstructors()[0];
}
diff --git a/GamecraftModdingAPI/Blocks/RemovalEngine.cs b/GamecraftModdingAPI/Blocks/RemovalEngine.cs
index 41e3c03..010b2fe 100644
--- a/GamecraftModdingAPI/Blocks/RemovalEngine.cs
+++ b/GamecraftModdingAPI/Blocks/RemovalEngine.cs
@@ -1,6 +1,6 @@
using System.Reflection;
-using Harmony;
+using HarmonyLib;
using RobocraftX.Blocks;
using RobocraftX.Blocks.Ghost;
using RobocraftX.Character.Camera;
@@ -65,7 +65,7 @@ namespace GamecraftModdingAPI.Blocks
Logging.MetaDebugLog("Requirements injected.");
}
- static MethodBase TargetMethod(HarmonyInstance instance)
+ static MethodBase TargetMethod(Harmony instance)
{
return AccessTools.TypeByName("RobocraftX.CR.MachineEditing.RemoveBlockEngine").GetConstructors()[0];
}
diff --git a/GamecraftModdingAPI/Commands/CommandPatch.cs b/GamecraftModdingAPI/Commands/CommandPatch.cs
index a0392ed..9cd3020 100644
--- a/GamecraftModdingAPI/Commands/CommandPatch.cs
+++ b/GamecraftModdingAPI/Commands/CommandPatch.cs
@@ -5,7 +5,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Reflection;
-using Harmony;
+using HarmonyLib;
using Svelto.Context;
using Svelto.ECS;
using RobocraftX;
@@ -33,7 +33,7 @@ namespace GamecraftModdingAPI.Commands
CommandManager.RegisterEngines(enginesRoot);
}
- public static MethodBase TargetMethod(HarmonyInstance instance)
+ public static MethodBase TargetMethod(Harmony instance)
{
return typeof(RobocraftX.GUI.CommandLine.CommandLineCompositionRoot).GetMethod("Compose").MakeGenericMethod(typeof(object));
//return func.Method;
diff --git a/GamecraftModdingAPI/Events/DeterministicStepComposeEngineGroupsPatch.cs b/GamecraftModdingAPI/Events/DeterministicStepComposeEngineGroupsPatch.cs
index 4779869..d6e58dc 100644
--- a/GamecraftModdingAPI/Events/DeterministicStepComposeEngineGroupsPatch.cs
+++ b/GamecraftModdingAPI/Events/DeterministicStepComposeEngineGroupsPatch.cs
@@ -5,7 +5,7 @@ using System.Reflection;
using System.Text;
using System.Threading.Tasks;
-using Harmony;
+using HarmonyLib;
using Svelto.ECS;
using RobocraftX.Common;
using RobocraftX.StateSync;
@@ -37,7 +37,7 @@ namespace GamecraftModdingAPI.Events
}
[HarmonyTargetMethod]
- public static MethodBase TargetMethod(HarmonyInstance harmonyInstance)
+ public static MethodBase TargetMethod(Harmony harmonyInstance)
{
return AccessTools.Method(AccessTools.TypeByName("RobocraftX.StateSync.GameHostTransitionDeterministicGroupEngine"), "EndTransition");
//.MakeGenericMethod(typeof(CosmeticEnginesSequenceBuildOrder), typeof(CosmeticEnginesSequenceSimOrder), typeof(DeterministicToCosmeticSyncBuildOrder), typeof(DeterministicToCosmeticSyncSimOrder));
diff --git a/GamecraftModdingAPI/Events/GameActivatedComposePatch.cs b/GamecraftModdingAPI/Events/GameActivatedComposePatch.cs
index 2c16c0c..9b2bf39 100644
--- a/GamecraftModdingAPI/Events/GameActivatedComposePatch.cs
+++ b/GamecraftModdingAPI/Events/GameActivatedComposePatch.cs
@@ -5,7 +5,7 @@ using System.Reflection;
using System.Text;
using System.Threading.Tasks;
-using Harmony;
+using HarmonyLib;
using RobocraftX;
using Svelto.ECS;
diff --git a/GamecraftModdingAPI/Events/GameReloadedPatch.cs b/GamecraftModdingAPI/Events/GameReloadedPatch.cs
index becd4dc..40f46e1 100644
--- a/GamecraftModdingAPI/Events/GameReloadedPatch.cs
+++ b/GamecraftModdingAPI/Events/GameReloadedPatch.cs
@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
-using Harmony;
+using HarmonyLib;
using RobocraftX;
using GamecraftModdingAPI.Utility;
diff --git a/GamecraftModdingAPI/Events/GameSwitchedToPatch.cs b/GamecraftModdingAPI/Events/GameSwitchedToPatch.cs
index eae4652..30bb0d5 100644
--- a/GamecraftModdingAPI/Events/GameSwitchedToPatch.cs
+++ b/GamecraftModdingAPI/Events/GameSwitchedToPatch.cs
@@ -5,7 +5,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Reflection;
-using Harmony;
+using HarmonyLib;
using RobocraftX;
using RobocraftX.CR.MainGame;
using Svelto.ECS;
diff --git a/GamecraftModdingAPI/Events/MenuActivatedPatch.cs b/GamecraftModdingAPI/Events/MenuActivatedPatch.cs
index 451e71e..2b66a05 100644
--- a/GamecraftModdingAPI/Events/MenuActivatedPatch.cs
+++ b/GamecraftModdingAPI/Events/MenuActivatedPatch.cs
@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
-using Harmony;
+using HarmonyLib;
using RobocraftX;
using Svelto.ECS;
diff --git a/GamecraftModdingAPI/Events/MenuSwitchedToPatch.cs b/GamecraftModdingAPI/Events/MenuSwitchedToPatch.cs
index ae26268..52a00b2 100644
--- a/GamecraftModdingAPI/Events/MenuSwitchedToPatch.cs
+++ b/GamecraftModdingAPI/Events/MenuSwitchedToPatch.cs
@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
-using Harmony;
+using HarmonyLib;
using RobocraftX;
using Svelto.ECS;
diff --git a/GamecraftModdingAPI/GamecraftModdingAPI.csproj b/GamecraftModdingAPI/GamecraftModdingAPI.csproj
index 100a7c9..86dfe3f 100644
--- a/GamecraftModdingAPI/GamecraftModdingAPI.csproj
+++ b/GamecraftModdingAPI/GamecraftModdingAPI.csproj
@@ -14,7 +14,7 @@
-
+
diff --git a/GamecraftModdingAPI/Inventory/Hotbar.cs b/GamecraftModdingAPI/Inventory/Hotbar.cs
index c649a66..838c554 100644
--- a/GamecraftModdingAPI/Inventory/Hotbar.cs
+++ b/GamecraftModdingAPI/Inventory/Hotbar.cs
@@ -5,7 +5,7 @@ using RobocraftX.Multiplayer.Input;
using GamecraftModdingAPI.Blocks;
using GamecraftModdingAPI.Utility;
-using Harmony;
+using HarmonyLib;
namespace GamecraftModdingAPI.Inventory
{
diff --git a/GamecraftModdingAPI/Inventory/HotbarSlotSelectionHandlerEnginePatch.cs b/GamecraftModdingAPI/Inventory/HotbarSlotSelectionHandlerEnginePatch.cs
index db50e4d..530184b 100644
--- a/GamecraftModdingAPI/Inventory/HotbarSlotSelectionHandlerEnginePatch.cs
+++ b/GamecraftModdingAPI/Inventory/HotbarSlotSelectionHandlerEnginePatch.cs
@@ -5,7 +5,7 @@ using RobocraftX.GUI;
using RobocraftX.GUI.Hotbar;
using Svelto.ECS;
-using Harmony;
+using HarmonyLib;
using GamecraftModdingAPI.Blocks;
namespace GamecraftModdingAPI.Inventory
@@ -24,7 +24,7 @@ namespace GamecraftModdingAPI.Inventory
selectedBlockInt = selectedDBPartID;
}
- public static MethodBase TargetMethod(HarmonyInstance instance)
+ public static MethodBase TargetMethod(Harmony harmonyInstance)
{
return PatchedMethod;
}
diff --git a/GamecraftModdingAPI/Main.cs b/GamecraftModdingAPI/Main.cs
index e0717d2..1258435 100644
--- a/GamecraftModdingAPI/Main.cs
+++ b/GamecraftModdingAPI/Main.cs
@@ -5,7 +5,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Reflection;
-using Harmony;
+using HarmonyLib;
using GamecraftModdingAPI.Utility;
using GamecraftModdingAPI.Events;
@@ -19,7 +19,7 @@ namespace GamecraftModdingAPI
///
public static class Main
{
- private static HarmonyInstance harmony;
+ private static Harmony harmony;
public static bool IsInitialized {
get { return harmony != null; }
@@ -43,7 +43,7 @@ namespace GamecraftModdingAPI
}
Logging.MetaDebugLog($"Patching Gamecraft");
var currentAssembly = Assembly.GetExecutingAssembly();
- harmony = HarmonyInstance.Create(currentAssembly.GetName().Name);
+ harmony = new Harmony(currentAssembly.GetName().Name);
harmony.PatchAll(currentAssembly);
// init utility
Logging.MetaDebugLog($"Initializing Utility");
diff --git a/GamecraftModdingAPI/Persistence/DeserializeFromDiskEntitiesEnginePatch.cs b/GamecraftModdingAPI/Persistence/DeserializeFromDiskEntitiesEnginePatch.cs
index 8f3482f..29bf987 100644
--- a/GamecraftModdingAPI/Persistence/DeserializeFromDiskEntitiesEnginePatch.cs
+++ b/GamecraftModdingAPI/Persistence/DeserializeFromDiskEntitiesEnginePatch.cs
@@ -7,7 +7,7 @@ using Svelto.DataStructures;
using Svelto.ECS;
using Svelto.ECS.Serialization;
-using Harmony;
+using HarmonyLib;
using GamecraftModdingAPI.Utility;
namespace GamecraftModdingAPI.Persistence
diff --git a/GamecraftModdingAPI/Persistence/SaveAndLoadCompositionRootPatch.cs b/GamecraftModdingAPI/Persistence/SaveAndLoadCompositionRootPatch.cs
index a510580..987cf86 100644
--- a/GamecraftModdingAPI/Persistence/SaveAndLoadCompositionRootPatch.cs
+++ b/GamecraftModdingAPI/Persistence/SaveAndLoadCompositionRootPatch.cs
@@ -3,7 +3,7 @@
using RobocraftX.SaveAndLoad;
using Svelto.ECS;
-using Harmony;
+using HarmonyLib;
namespace GamecraftModdingAPI.Persistence
{
diff --git a/GamecraftModdingAPI/Persistence/SaveGameEnginePatch.cs b/GamecraftModdingAPI/Persistence/SaveGameEnginePatch.cs
index 21cd68a..a603fa2 100644
--- a/GamecraftModdingAPI/Persistence/SaveGameEnginePatch.cs
+++ b/GamecraftModdingAPI/Persistence/SaveGameEnginePatch.cs
@@ -9,7 +9,7 @@ using Svelto.ECS;
using Svelto.ECS.Serialization;
using GamecraftModdingAPI.Utility;
-using Harmony;
+using HarmonyLib;
namespace GamecraftModdingAPI.Persistence
{
diff --git a/GamecraftModdingAPI/Tests/GamecraftModdingAPIPluginTest.cs b/GamecraftModdingAPI/Tests/GamecraftModdingAPIPluginTest.cs
index 732854e..80cc916 100644
--- a/GamecraftModdingAPI/Tests/GamecraftModdingAPIPluginTest.cs
+++ b/GamecraftModdingAPI/Tests/GamecraftModdingAPIPluginTest.cs
@@ -1,7 +1,7 @@
using System;
using System.Reflection;
-using Harmony;
+using HarmonyLib;
// test
using Svelto.ECS;
using RobocraftX.Blocks;
@@ -24,7 +24,7 @@ namespace GamecraftModdingAPI.Tests
: IllusionPlugin.IEnhancedPlugin
#endif
{
- private static HarmonyInstance harmony { get; set; }
+ private static Harmony harmony { get; set; }
public string[] Filter { get; } = new string[] { "Gamecraft", "GamecraftPreview" };
@@ -42,7 +42,7 @@ namespace GamecraftModdingAPI.Tests
public void OnApplicationStart()
{
FileLog.Reset();
- HarmonyInstance.DEBUG = true;
+ Harmony.DEBUG = true;
GamecraftModdingAPI.Main.Init();
Logging.MetaDebugLog($"Version group id {(uint)ApiExclusiveGroups.versionGroup}");
// in case Steam is not installed/running
diff --git a/GamecraftModdingAPI/Utility/AnalyticsDisablerPatch.cs b/GamecraftModdingAPI/Utility/AnalyticsDisablerPatch.cs
index b18304a..048e6fc 100644
--- a/GamecraftModdingAPI/Utility/AnalyticsDisablerPatch.cs
+++ b/GamecraftModdingAPI/Utility/AnalyticsDisablerPatch.cs
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
using System.Reflection;
using Analytics;
-using Harmony;
+using HarmonyLib;
using RobocraftX.Common;
using Svelto.ECS;
@@ -30,7 +30,7 @@ namespace GamecraftModdingAPI.Utility
return !DisableAnalytics;
}
- public static MethodBase TargetMethod(HarmonyInstance instance)
+ public static MethodBase TargetMethod(Harmony instance)
{
return typeof(Analytics.AnalyticsCompositionRoot).GetMethod("Compose").MakeGenericMethod(typeof(object));
}
diff --git a/GamecraftModdingAPI/Utility/FullGameFields.cs b/GamecraftModdingAPI/Utility/FullGameFields.cs
index 377f451..5291d4a 100644
--- a/GamecraftModdingAPI/Utility/FullGameFields.cs
+++ b/GamecraftModdingAPI/Utility/FullGameFields.cs
@@ -5,7 +5,7 @@ using System.Text;
using System.Threading.Tasks;
using DataLoader;
-using Harmony;
+using HarmonyLib;
using RobocraftX;
using RobocraftX.Common.Utilities;
using RobocraftX.GUI;
diff --git a/GamecraftModdingAPI/Utility/MinimumSpecsCheckPatch.cs b/GamecraftModdingAPI/Utility/MinimumSpecsCheckPatch.cs
index 739c232..23d392c 100644
--- a/GamecraftModdingAPI/Utility/MinimumSpecsCheckPatch.cs
+++ b/GamecraftModdingAPI/Utility/MinimumSpecsCheckPatch.cs
@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
-using Harmony;
+using HarmonyLib;
using RobocraftX.FrontEnd;
namespace GamecraftModdingAPI.Utility
diff --git a/GamecraftModdingAPI/Utility/SteamInitPatch.cs b/GamecraftModdingAPI/Utility/SteamInitPatch.cs
index c57b4e8..b8546c2 100644
--- a/GamecraftModdingAPI/Utility/SteamInitPatch.cs
+++ b/GamecraftModdingAPI/Utility/SteamInitPatch.cs
@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
-using Harmony;
+using HarmonyLib;
using RobocraftX.Common;
namespace GamecraftModdingAPI.Utility