Add Reload keybind
This commit is contained in:
@@ -78,6 +78,11 @@ public static class ContextMenuShortcutPatches
|
|||||||
TryInteraction(__instance, itemContext, EItemInfoButton.UseAll, [EItemInfoButton.Use]);
|
TryInteraction(__instance, itemContext, EItemInfoButton.UseAll, [EItemInfoButton.Use]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Settings.ReloadKeyBind.Value.IsDown())
|
||||||
|
{
|
||||||
|
TryInteraction(__instance, itemContext, EItemInfoButton.Reload);
|
||||||
|
}
|
||||||
|
|
||||||
if (Settings.UnloadKeyBind.Value.IsDown())
|
if (Settings.UnloadKeyBind.Value.IsDown())
|
||||||
{
|
{
|
||||||
TryInteraction(__instance, itemContext, EItemInfoButton.Unload, [EItemInfoButton.UnloadAmmo]);
|
TryInteraction(__instance, itemContext, EItemInfoButton.Unload, [EItemInfoButton.UnloadAmmo]);
|
||||||
|
10
Settings.cs
10
Settings.cs
@@ -99,6 +99,7 @@ internal class Settings
|
|||||||
public static ConfigEntry<KeyboardShortcut> TopUpKeyBind { get; set; }
|
public static ConfigEntry<KeyboardShortcut> TopUpKeyBind { get; set; }
|
||||||
public static ConfigEntry<KeyboardShortcut> UseKeyBind { get; set; }
|
public static ConfigEntry<KeyboardShortcut> UseKeyBind { get; set; }
|
||||||
public static ConfigEntry<KeyboardShortcut> UseAllKeyBind { get; set; }
|
public static ConfigEntry<KeyboardShortcut> UseAllKeyBind { get; set; }
|
||||||
|
public static ConfigEntry<KeyboardShortcut> ReloadKeyBind { get; set; }
|
||||||
public static ConfigEntry<KeyboardShortcut> UnloadKeyBind { get; set; }
|
public static ConfigEntry<KeyboardShortcut> UnloadKeyBind { get; set; }
|
||||||
public static ConfigEntry<KeyboardShortcut> UnpackKeyBind { get; set; }
|
public static ConfigEntry<KeyboardShortcut> UnpackKeyBind { get; set; }
|
||||||
public static ConfigEntry<KeyboardShortcut> FilterByKeyBind { get; set; }
|
public static ConfigEntry<KeyboardShortcut> FilterByKeyBind { get; set; }
|
||||||
@@ -399,6 +400,15 @@ internal class Settings
|
|||||||
null,
|
null,
|
||||||
new ConfigurationManagerAttributes { })));
|
new ConfigurationManagerAttributes { })));
|
||||||
|
|
||||||
|
configEntries.Add(ReloadKeyBind = config.Bind(
|
||||||
|
InputSection,
|
||||||
|
"Reload Weapon Shortcut",
|
||||||
|
new KeyboardShortcut(KeyCode.R),
|
||||||
|
new ConfigDescription(
|
||||||
|
"Keybind to reload a weapon. Note that this is solely in the menus, and doesn't affect the normal reload key.",
|
||||||
|
null,
|
||||||
|
new ConfigurationManagerAttributes { })));
|
||||||
|
|
||||||
configEntries.Add(UnloadKeyBind = config.Bind(
|
configEntries.Add(UnloadKeyBind = config.Bind(
|
||||||
InputSection,
|
InputSection,
|
||||||
"Unload Mag/Ammo Shortcut",
|
"Unload Mag/Ammo Shortcut",
|
||||||
|
Reference in New Issue
Block a user