diff --git a/MiraAPI/Patches/Events/CanUsePatches.cs b/MiraAPI/Patches/Events/CanUsePatches.cs index 7af9acd2..f99d2b90 100644 --- a/MiraAPI/Patches/Events/CanUsePatches.cs +++ b/MiraAPI/Patches/Events/CanUsePatches.cs @@ -3,6 +3,7 @@ using System.Reflection; using HarmonyLib; using MiraAPI.Events; using MiraAPI.Events.Vanilla.Usables; +using UnityEngine; namespace MiraAPI.Patches.Events; @@ -27,7 +28,7 @@ public static class CanUsePatches [HarmonyPriority(Priority.Last)] [HarmonyPrefix] - public static bool CanUsePatch(Il2CppSystem.Object __instance, [HarmonyArgument(1)] out bool canUse, [HarmonyArgument(2)] out bool couldUse) + public static bool CanUsePatch(MonoBehaviour __instance, [HarmonyArgument(1)] out bool canUse, [HarmonyArgument(2)] out bool couldUse) { canUse = couldUse = false; diff --git a/MiraAPI/Patches/Events/UsePatches.cs b/MiraAPI/Patches/Events/UsePatches.cs index a6c4b1d4..4d783f39 100644 --- a/MiraAPI/Patches/Events/UsePatches.cs +++ b/MiraAPI/Patches/Events/UsePatches.cs @@ -3,6 +3,7 @@ using System.Reflection; using HarmonyLib; using MiraAPI.Events; using MiraAPI.Events.Vanilla.Usables; +using UnityEngine; namespace MiraAPI.Patches.Events; @@ -25,7 +26,7 @@ public static class UsePatches [HarmonyPriority(Priority.Last)] [HarmonyPrefix] - public static bool UsePatch(Il2CppSystem.Object __instance) + public static bool UsePatch(MonoBehaviour __instance) { var @event = new PlayerUseEvent(__instance.Cast()); MiraEventManager.InvokeEvent(@event);