Skip to content
This repository has been archived by the owner on Apr 8, 2023. It is now read-only.

mes: Left Click Invigorate #2251

Merged
merged 3 commits into from
Jan 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1958,7 +1958,7 @@ default String shiftCustomSwaps()

@ConfigItem(
keyName = "bankWieldItem",
name = "Left Click 'Wield' In Bank Screen",
name = "Bank - Left Click 'Wield'",
description = "Enables Hotkey Left Click 'Wield' In Bank When Pressing The Hotkey",
position = 2,
section = "hotkeySwapping"
Expand All @@ -1971,7 +1971,7 @@ default boolean bankWieldItem()

@ConfigItem(
keyName = "bankWearItem",
name = "Left Click 'Wear' In Bank Screen",
name = "Bank - Left Click 'Wear'",
description = "Enables Hotkey Left Click 'Wear' In Bank When Pressing The Hotkey",
position = 3,
section = "hotkeySwapping"
Expand All @@ -1984,7 +1984,7 @@ default boolean bankWearItem()

@ConfigItem(
keyName = "bankEatItem",
name = "Left Click 'Eat' In Bank Screen",
name = "Bank - Left Click 'Eat'",
description = "Enables Left Click 'Eat' In Bank When Pressing The Hotkey",
position = 4,
section = "hotkeySwapping"
Expand All @@ -1997,7 +1997,7 @@ default boolean bankEatItem()

@ConfigItem(
keyName = "bankDrinkItem",
name = "Left Click 'Drink' In Bank Screen",
name = "Bank - Left Click 'Drink'",
description = "Enables Left Click 'Drink' In Bank When Pressing The Hotkey",
position = 5,
section = "hotkeySwapping"
Expand All @@ -2010,7 +2010,7 @@ default boolean bankDrinkItem()

@ConfigItem(
keyName = "bankEquipItem",
name = "Left Click 'Equip' In Bank Screen",
name = "Bank - Left Click 'Equip'",
description = "Enables Left Click 'Equip' In Bank When Pressing The Hotkey",
position = 6,
section = "hotkeySwapping"
Expand All @@ -2020,4 +2020,17 @@ default boolean bankEquipItem()
{
return false;
}

@ConfigItem(
keyName = "bankInvigorateItem",
name = "Bank - Left Click 'Invigorate'",
description = "Enables Left Click 'Invigorate' In Bank When Pressing The Hotkey",
position = 7,
section = "hotkeySwapping"
)

default boolean bankInvigorateItem()
{
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ public class MenuEntrySwapperPlugin extends Plugin
private boolean bankEatItem;
private boolean bankDrinkItem;
private boolean bankEquipItem;
private boolean bankInvigorateItem;
private final HotkeyListener hotkey = new HotkeyListener(() -> this.hotkeyMod)
{
@Override
Expand Down Expand Up @@ -1502,6 +1503,10 @@ private void addHotkey(ClientTick event)
{
menuManager.addPriorityEntry(new BankComparableEntry("equip", "", false));
}
if (this.bankInvigorateItem)
{
menuManager.addPriorityEntry(new BankComparableEntry("invigorate", "", false));
}
if (this.swapClimbUpDown)
{
menuManager.addPriorityEntry("climb-up").setPriority(100);
Expand All @@ -1517,12 +1522,13 @@ private void stopHotkey()

private void removeHotkey(ClientTick event)
{
menuManager.removePriorityEntry("climb-up");
menuManager.removePriorityEntry(new BankComparableEntry("wield", "", false));
menuManager.removePriorityEntry(new BankComparableEntry("wear", "", false));
menuManager.removePriorityEntry(new BankComparableEntry("eat", "", false));
menuManager.removePriorityEntry(new BankComparableEntry("drink", "", false));
menuManager.removePriorityEntry(new BankComparableEntry("equip", "", false));
menuManager.removePriorityEntry(new BankComparableEntry("invigorate", "", false));
menuManager.removePriorityEntry("climb-up");

loadCustomSwaps("", customShiftSwaps);
eventBus.unregister(HOTKEY);
Expand Down Expand Up @@ -1760,6 +1766,7 @@ private void updateConfig()
this.bankEatItem = config.bankEatItem();
this.bankDrinkItem = config.bankDrinkItem();
this.bankEquipItem = config.bankEquipItem();
this.bankInvigorateItem = config.bankInvigorateItem();
}

private void addBuySellEntries()
Expand Down Expand Up @@ -2014,4 +2021,4 @@ private void updateRemovedObjects()
removedObjects = null;
}
}
}
}