mes: add an option to swap offer-all (#2270)

This commit is contained in:
Ganom
2020-01-21 02:07:09 -05:00
committed by GitHub
parent 2ab6b2ee5f
commit 942ce20f96
2 changed files with 25 additions and 6 deletions

View File

@@ -475,7 +475,6 @@ public interface MenuEntrySwapperConfig extends Config
// Miscellaneous // Miscellaneous
//------------------------------------------------------------// //------------------------------------------------------------//
@ConfigItem( @ConfigItem(
keyName = "customSwaps", keyName = "customSwaps",
name = "Custom Swaps", name = "Custom Swaps",
@@ -511,6 +510,18 @@ public interface MenuEntrySwapperConfig extends Config
return ""; return "";
} }
@ConfigItem(
keyName = "getSwapOffer",
name = "Offer-All",
description = "Swap 'Offer', on trades with 'Offer-All'",
position = 3,
section = "miscellaneousSection"
)
default boolean getSwapOffer()
{
return false;
}
@ConfigItem( @ConfigItem(
keyName = "swapCoalBag", keyName = "swapCoalBag",
name = "Coal Bag", name = "Coal Bag",

View File

@@ -299,6 +299,7 @@ public class MenuEntrySwapperPlugin extends Plugin
private boolean swapTravel; private boolean swapTravel;
private boolean swapWildernessLever; private boolean swapWildernessLever;
private boolean swapJewelleryBox; private boolean swapJewelleryBox;
private boolean getSwapOffer;
private final HotkeyListener hotkey = new HotkeyListener(() -> this.hotkeyMod) private final HotkeyListener hotkey = new HotkeyListener(() -> this.hotkeyMod)
{ {
@Override @Override
@@ -821,6 +822,11 @@ public class MenuEntrySwapperPlugin extends Plugin
menuManager.addPriorityEntry("Tan <col=ff7000>All"); menuManager.addPriorityEntry("Tan <col=ff7000>All");
} }
if (this.getSwapOffer)
{
menuManager.addPriorityEntry("Offer-All<col=ff9040>");
}
if (this.getSwapSawmill) if (this.getSwapSawmill)
{ {
menuManager.addPriorityEntry("Buy-plank", "Sawmill operator"); menuManager.addPriorityEntry("Buy-plank", "Sawmill operator");
@@ -1319,6 +1325,7 @@ public class MenuEntrySwapperPlugin extends Plugin
menuManager.removePriorityEntry("Stun", "Hoop snake"); menuManager.removePriorityEntry("Stun", "Hoop snake");
menuManager.removePriorityEntry("Take-boat"); menuManager.removePriorityEntry("Take-boat");
menuManager.removePriorityEntry("Tan <col=ff7000>All"); menuManager.removePriorityEntry("Tan <col=ff7000>All");
menuManager.removePriorityEntry("Offer-All<col=ff9040>");
menuManager.removePriorityEntry("Teleport menu", "Portal nexus"); menuManager.removePriorityEntry("Teleport menu", "Portal nexus");
menuManager.removePriorityEntry("Teleport", "Crafting cape"); menuManager.removePriorityEntry("Teleport", "Crafting cape");
menuManager.removePriorityEntry("Teleport", "Crafting cape(t)"); menuManager.removePriorityEntry("Teleport", "Crafting cape(t)");
@@ -1788,6 +1795,7 @@ public class MenuEntrySwapperPlugin extends Plugin
this.bankEquipItem = config.bankEquipItem(); this.bankEquipItem = config.bankEquipItem();
this.bankInvigorateItem = config.bankInvigorateItem(); this.bankInvigorateItem = config.bankInvigorateItem();
this.swapNpcContact = config.swapNpcContact(); this.swapNpcContact = config.swapNpcContact();
this.getSwapOffer = config.getSwapOffer();
} }
private void addBuySellEntries() private void addBuySellEntries()