This commit is contained in:
Tyfon
2024-07-20 13:50:44 -07:00
parent e19cf80c35
commit 94b080159d
4 changed files with 29 additions and 33 deletions

View File

@@ -19,7 +19,6 @@ public static class ContextMenuShortcutPatches
new ItemUiContextPatch().Enable();
new HideoutItemViewRegisterContextPatch().Enable();
new HideoutItemViewUnegisterContextPatch().Enable();
new TradingPanelRegisterContextPatch().Enable();
new TradingPanelUnregisterContextPatch().Enable();
@@ -127,20 +126,6 @@ public static class ContextMenuShortcutPatches
}
}
public class HideoutItemViewUnegisterContextPatch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return AccessTools.Method(typeof(HideoutItemView), nameof(HideoutItemView.OnPointerExit));
}
[PatchPostfix]
public static void Postfix(HideoutItemView __instance, ItemUiContext ___ItemUiContext)
{
___ItemUiContext.UnregisterCurrentItemContext(__instance.ItemContext);
}
}
public class TradingPanelRegisterContextPatch : ModulePatch
{
protected override MethodBase GetTargetMethod()