summaryrefslogtreecommitdiff
path: root/src/SMAPI/Patches/LoadContextPatch.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-06-15 22:17:32 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-06-15 22:17:32 -0400
commitdcd2c647a2abd836e8ee20f8ddad6568c9b4fbf2 (patch)
tree5a03bc9ec491467379f5bfea85e8778500461403 /src/SMAPI/Patches/LoadContextPatch.cs
parent6d1cd7d9b884bddd00675dfdca9f63dc7db1bd1f (diff)
downloadSMAPI-dcd2c647a2abd836e8ee20f8ddad6568c9b4fbf2.tar.gz
SMAPI-dcd2c647a2abd836e8ee20f8ddad6568c9b4fbf2.tar.bz2
SMAPI-dcd2c647a2abd836e8ee20f8ddad6568c9b4fbf2.zip
temporarily restore Harmony 1.x support with compile flag (#711)
Diffstat (limited to 'src/SMAPI/Patches/LoadContextPatch.cs')
-rw-r--r--src/SMAPI/Patches/LoadContextPatch.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/SMAPI/Patches/LoadContextPatch.cs b/src/SMAPI/Patches/LoadContextPatch.cs
index 9c707676..768ddd6b 100644
--- a/src/SMAPI/Patches/LoadContextPatch.cs
+++ b/src/SMAPI/Patches/LoadContextPatch.cs
@@ -1,6 +1,10 @@
using System;
using System.Diagnostics.CodeAnalysis;
+#if HARMONY_2
using HarmonyLib;
+#else
+using Harmony;
+#endif
using StardewModdingAPI.Enums;
using StardewModdingAPI.Framework.Patching;
using StardewModdingAPI.Framework.Reflection;
@@ -47,7 +51,11 @@ namespace StardewModdingAPI.Patches
/// <summary>Apply the Harmony patch.</summary>
/// <param name="harmony">The Harmony instance.</param>
+#if HARMONY_2
public void Apply(Harmony harmony)
+#else
+ public void Apply(HarmonyInstance harmony)
+#endif
{
// detect CreatedBasicInfo
harmony.Patch(