From 51c0a28579aa79ccaa081bd385d81a5c1d95ad35 Mon Sep 17 00:00:00 2001 From: Kevin nX_ J Date: Wed, 9 Jun 2021 12:52:31 +0200 Subject: [PATCH] Fixes for 0.154.1 --- ValheimPlus/GameClasses/Fermenter.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ValheimPlus/GameClasses/Fermenter.cs b/ValheimPlus/GameClasses/Fermenter.cs index c776f406..b4caf569 100644 --- a/ValheimPlus/GameClasses/Fermenter.cs +++ b/ValheimPlus/GameClasses/Fermenter.cs @@ -104,12 +104,13 @@ private static bool Prefix(ref Fermenter __instance, ref string __result) } } - [HarmonyPatch(typeof(Fermenter), nameof(Fermenter.UpdateVis))] - public static class Fermenter_UpdateVis_Transpiler + // Update 0.154.1 refactored the name to SlowUpdate from UpdateVis + [HarmonyPatch(typeof(Fermenter), nameof(Fermenter.SlowUpdate))] + public static class Fermenter_SlowUpdate_Transpiler { private static MethodInfo method_GameObject_SetActive = AccessTools.Method(typeof(GameObject), nameof(GameObject.SetActive)); - private static MethodInfo method_InvokeRPCTap = AccessTools.Method(typeof(Fermenter_UpdateVis_Transpiler), nameof(Fermenter_UpdateVis_Transpiler.InvokeRPCTap)); - private static MethodInfo method_AddItemFromNearbyChests = AccessTools.Method(typeof(Fermenter_UpdateVis_Transpiler), nameof(Fermenter_UpdateVis_Transpiler.AddItemFromNearbyChests)); + private static MethodInfo method_InvokeRPCTap = AccessTools.Method(typeof(Fermenter_SlowUpdate_Transpiler), nameof(Fermenter_SlowUpdate_Transpiler.InvokeRPCTap)); + private static MethodInfo method_AddItemFromNearbyChests = AccessTools.Method(typeof(Fermenter_SlowUpdate_Transpiler), nameof(Fermenter_SlowUpdate_Transpiler.AddItemFromNearbyChests)); /// /// Patches out the code that check for Fermenter status. @@ -138,7 +139,7 @@ public static IEnumerable Transpiler(IEnumerable Transpiler(IEnumerable