summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/Patching
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-05-05 20:49:05 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-05-05 20:49:05 -0400
commite08979acd301792435661d2c0008469a800f8dbb (patch)
tree2c3d1b04f932e0cdb2e51a1acea179d441ce1c1b /src/SMAPI/Framework/Patching
parent9728fe3f347328323ff79c6c93df2ab390f6070e (diff)
downloadSMAPI-e08979acd301792435661d2c0008469a800f8dbb.tar.gz
SMAPI-e08979acd301792435661d2c0008469a800f8dbb.tar.bz2
SMAPI-e08979acd301792435661d2c0008469a800f8dbb.zip
migrate to Harmony 2.0 (#711)
Diffstat (limited to 'src/SMAPI/Framework/Patching')
-rw-r--r--src/SMAPI/Framework/Patching/GamePatcher.cs4
-rw-r--r--src/SMAPI/Framework/Patching/IHarmonyPatch.cs4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/SMAPI/Framework/Patching/GamePatcher.cs b/src/SMAPI/Framework/Patching/GamePatcher.cs
index f82159d0..cdb54453 100644
--- a/src/SMAPI/Framework/Patching/GamePatcher.cs
+++ b/src/SMAPI/Framework/Patching/GamePatcher.cs
@@ -1,5 +1,5 @@
using System;
-using Harmony;
+using HarmonyLib;
namespace StardewModdingAPI.Framework.Patching
{
@@ -27,7 +27,7 @@ namespace StardewModdingAPI.Framework.Patching
/// <param name="patches">The patches to apply.</param>
public void Apply(params IHarmonyPatch[] patches)
{
- HarmonyInstance harmony = HarmonyInstance.Create("io.smapi");
+ Harmony harmony = new Harmony("io.smapi");
foreach (IHarmonyPatch patch in patches)
{
try
diff --git a/src/SMAPI/Framework/Patching/IHarmonyPatch.cs b/src/SMAPI/Framework/Patching/IHarmonyPatch.cs
index cb42f40e..7d5eb3d4 100644
--- a/src/SMAPI/Framework/Patching/IHarmonyPatch.cs
+++ b/src/SMAPI/Framework/Patching/IHarmonyPatch.cs
@@ -1,4 +1,4 @@
-using Harmony;
+using HarmonyLib;
namespace StardewModdingAPI.Framework.Patching
{
@@ -10,6 +10,6 @@ namespace StardewModdingAPI.Framework.Patching
/// <summary>Apply the Harmony patch.</summary>
/// <param name="harmony">The Harmony instance.</param>
- void Apply(HarmonyInstance harmony);
+ void Apply(Harmony harmony);
}
}