diff --git a/Patches/FixFleaPatches.cs b/Patches/FixFleaPatches.cs index d2304c5..dbd713e 100644 --- a/Patches/FixFleaPatches.cs +++ b/Patches/FixFleaPatches.cs @@ -1,12 +1,6 @@ using Aki.Reflection.Patching; -using EFT.InventoryLogic; -using EFT.Quests; -using EFT.UI; using EFT.UI.Ragfair; using HarmonyLib; -using System; -using System.Collections.Generic; -using System.Linq; using System.Reflection; using TMPro; using UnityEngine; @@ -23,6 +17,7 @@ namespace UIFixes new ToggleOnOpenPatch().Enable(); new OfferItemFixMaskPatch().Enable(); + new BlockActionsClickThroughPatch().Enable(); } public class DoNotToggleOnMouseOverPatch : ModulePatch @@ -76,5 +71,25 @@ namespace UIFixes } } } + + public class BlockActionsClickThroughPatch : ModulePatch + { + protected override MethodBase GetTargetMethod() + { + return AccessTools.Method(typeof(OfferView), nameof(OfferView.Awake)); + } + + [PatchPostfix] + public static void Postfix(OfferView __instance) + { + // Intercept clicks on the actions area + var blocker = __instance.transform.Find("Actions").gameObject.GetOrAddComponent