Unload ammo keybind

This commit is contained in:
Tyfon
2024-06-12 17:01:38 -07:00
parent 0ceada0db9
commit 88c3afb698
2 changed files with 17 additions and 2 deletions

View File

@@ -66,6 +66,12 @@ namespace UIFixes
}
}
if (Settings.UnloadAmmoKeyBind.Value.IsDown())
{
__instance.GetItemContextInteractions(itemContext, null).ExecuteInteraction(EItemInfoButton.UnloadAmmo);
return;
}
if (Settings.FilterByKeyBind.Value.IsDown())
{
__instance.GetItemContextInteractions(itemContext, null).ExecuteInteraction(EItemInfoButton.FilterSearch);

View File

@@ -41,12 +41,12 @@ namespace UIFixes
public static ConfigEntry<bool> UseHomeEnd { get; set; }
public static ConfigEntry<bool> RebindPageUpDown { get; set; }
public static ConfigEntry<int> MouseScrollMulti { get; set; }
public static ConfigEntry<KeyboardShortcut> InspectKeyBind { get; set; }
public static ConfigEntry<KeyboardShortcut> OpenKeyBind { get; set; }
public static ConfigEntry<KeyboardShortcut> TopUpKeyBind { get; set; }
public static ConfigEntry<KeyboardShortcut> UseKeyBind { get; set; }
public static ConfigEntry<KeyboardShortcut> UseAllKeyBind { get; set; }
public static ConfigEntry<KeyboardShortcut> UnloadAmmoKeyBind { get; set; }
public static ConfigEntry<KeyboardShortcut> FilterByKeyBind { get; set; }
public static ConfigEntry<KeyboardShortcut> LinkedSearchKeyBind { get; set; }
public static ConfigEntry<bool> UseRaidMouseScrollMulti { get; set; } // Advanced
@@ -203,7 +203,7 @@ namespace UIFixes
"Use Item Shortcut",
new KeyboardShortcut(KeyCode.None),
new ConfigDescription(
"Keybind to use an item, such a consumable.",
"Keybind to use an item, such a consumable",
null,
new ConfigurationManagerAttributes { })));
@@ -216,6 +216,15 @@ namespace UIFixes
null,
new ConfigurationManagerAttributes { })));
configEntries.Add(UnloadAmmoKeyBind = config.Bind(
InputSection,
"Unload Ammo Shortcut",
new KeyboardShortcut(KeyCode.None),
new ConfigDescription(
"Keybind to unload the ammo in a magazine",
null,
new ConfigurationManagerAttributes { })));
configEntries.Add(FilterByKeyBind = config.Bind(
InputSection,
"Filter by Item Shortcut",