summaryrefslogtreecommitdiff
path: root/src/SMAPI/Patches/LoadErrorPatch.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/LoadErrorPatch.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/LoadErrorPatch.cs')
-rw-r--r--src/SMAPI/Patches/LoadErrorPatch.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/SMAPI/Patches/LoadErrorPatch.cs b/src/SMAPI/Patches/LoadErrorPatch.cs
index f8ad6693..5e67b169 100644
--- a/src/SMAPI/Patches/LoadErrorPatch.cs
+++ b/src/SMAPI/Patches/LoadErrorPatch.cs
@@ -2,7 +2,11 @@ using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
+#if HARMONY_2
using HarmonyLib;
+#else
+using Harmony;
+#endif
using StardewModdingAPI.Framework.Exceptions;
using StardewModdingAPI.Framework.Patching;
using StardewValley;
@@ -49,7 +53,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
{
harmony.Patch(
original: AccessTools.Method(typeof(SaveGame), nameof(SaveGame.loadDataToLocations)),