From 466f5c24b8fd35ec388aea22fe7cccd9231999fb Mon Sep 17 00:00:00 2001 From: Tyfon <29051038+tyfon7@users.noreply.github.com> Date: Mon, 23 Sep 2024 09:26:04 -0700 Subject: [PATCH] Required search keybind --- src/Patches/ContextMenuShortcutPatches.cs | 5 +++++ src/Settings.cs | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/Patches/ContextMenuShortcutPatches.cs b/src/Patches/ContextMenuShortcutPatches.cs index 825d508..24e3c9c 100644 --- a/src/Patches/ContextMenuShortcutPatches.cs +++ b/src/Patches/ContextMenuShortcutPatches.cs @@ -101,6 +101,11 @@ public static class ContextMenuShortcutPatches TryInteraction(__instance, itemContext, EItemInfoButton.LinkedSearch); } + if (Settings.RequiredSearchKeyBind.Value.IsDown()) + { + TryInteraction(__instance, itemContext, EItemInfoButton.NeededSearch); + } + if (Settings.SortingTableKeyBind.Value.IsDown()) { MoveToFromSortingTable(itemContext, __instance); diff --git a/src/Settings.cs b/src/Settings.cs index 36f2a7f..bf16312 100644 --- a/src/Settings.cs +++ b/src/Settings.cs @@ -105,6 +105,7 @@ internal class Settings public static ConfigEntry UnpackKeyBind { get; set; } public static ConfigEntry FilterByKeyBind { get; set; } public static ConfigEntry LinkedSearchKeyBind { get; set; } + public static ConfigEntry RequiredSearchKeyBind { get; set; } public static ConfigEntry AddOfferKeyBind { get; set; } public static ConfigEntry SortingTableKeyBind { get; set; } public static ConfigEntry SearchKeyBind { get; set; } @@ -457,6 +458,15 @@ internal class Settings null, new ConfigurationManagerAttributes { }))); + configEntries.Add(RequiredSearchKeyBind = config.Bind( + InputSection, + "Required Search Shortcut", + new KeyboardShortcut(KeyCode.None), + new ConfigDescription( + "Keybind to search flea market for items to barter for this item", + null, + new ConfigurationManagerAttributes { }))); + configEntries.Add(AddOfferKeyBind = config.Bind( InputSection, "Add Offer Shortcut",