menuentryswapper: add construction enum.

This commit is contained in:
Ganom
2019-08-16 02:08:25 -04:00
parent c5934045d5
commit 103d06c60c
4 changed files with 237 additions and 206 deletions

View File

@@ -569,6 +569,11 @@ public class MenuManager
return entry; return entry;
} }
public void removePriorityEntry(AbstractComparableEntry entry)
{
priorityEntries.removeIf(entry::equals);
}
public void removePriorityEntry(String option) public void removePriorityEntry(String option)
{ {
option = Text.standardize(option); option = Text.standardize(option);

View File

@@ -31,8 +31,10 @@ import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup; import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem; import net.runelite.client.config.ConfigItem;
import net.runelite.client.plugins.menuentryswapper.util.BurningAmuletMode; import net.runelite.client.plugins.menuentryswapper.util.BurningAmuletMode;
import net.runelite.client.plugins.menuentryswapper.util.CharterOption;
import net.runelite.client.plugins.menuentryswapper.util.CombatBraceletMode; import net.runelite.client.plugins.menuentryswapper.util.CombatBraceletMode;
import net.runelite.client.plugins.menuentryswapper.util.ConstructionCapeMode; import net.runelite.client.plugins.menuentryswapper.util.ConstructionCapeMode;
import net.runelite.client.plugins.menuentryswapper.util.ConstructionMode;
import net.runelite.client.plugins.menuentryswapper.util.DigsitePendantMode; import net.runelite.client.plugins.menuentryswapper.util.DigsitePendantMode;
import net.runelite.client.plugins.menuentryswapper.util.DuelingRingMode; import net.runelite.client.plugins.menuentryswapper.util.DuelingRingMode;
import net.runelite.client.plugins.menuentryswapper.util.FairyRingMode; import net.runelite.client.plugins.menuentryswapper.util.FairyRingMode;
@@ -48,7 +50,6 @@ import net.runelite.client.plugins.menuentryswapper.util.RingOfWealthMode;
import net.runelite.client.plugins.menuentryswapper.util.SkillsNecklaceMode; import net.runelite.client.plugins.menuentryswapper.util.SkillsNecklaceMode;
import net.runelite.client.plugins.menuentryswapper.util.SlayerRingMode; import net.runelite.client.plugins.menuentryswapper.util.SlayerRingMode;
import net.runelite.client.plugins.menuentryswapper.util.XericsTalismanMode; import net.runelite.client.plugins.menuentryswapper.util.XericsTalismanMode;
import net.runelite.client.plugins.menuentryswapper.util.CharterOption;
@ConfigGroup("menuentryswapper") @ConfigGroup("menuentryswapper")
@@ -208,7 +209,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapMax", keyName = "swapMax",
name = "Swap Max Cape", name = "Max Cape",
description = "Enables swapping max cape options in worn interface.", description = "Enables swapping max cape options in worn interface.",
position = 0, position = 0,
group = "Equipment swapper" group = "Equipment swapper"
@@ -234,7 +235,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapArdougneCape", keyName = "swapArdougneCape",
name = "Swap Ardougne Cape", name = "Ardougne Cape",
description = "Enables swapping of 'Teleport' and 'Wear'.", description = "Enables swapping of 'Teleport' and 'Wear'.",
position = 2, position = 2,
group = "Equipment swapper" group = "Equipment swapper"
@@ -246,7 +247,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapConstructionCape", keyName = "swapConstructionCape",
name = "Swap Construction Cape", name = "Construction Cape",
description = "Enables swapping of 'Teleport' and 'Wear'.", description = "Enables swapping of 'Teleport' and 'Wear'.",
position = 3, position = 3,
group = "Equipment swapper" group = "Equipment swapper"
@@ -272,7 +273,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapCraftingCape", keyName = "swapCraftingCape",
name = "Swap Crafting Cape", name = "Crafting Cape",
description = "Enables swapping of 'Teleport' and 'Wear'.", description = "Enables swapping of 'Teleport' and 'Wear'.",
position = 5, position = 5,
group = "Equipment swapper" group = "Equipment swapper"
@@ -284,7 +285,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapMagicCape", keyName = "swapMagicCape",
name = "Swap Magic Cape", name = "Magic Cape",
description = "Enables swapping of 'Spellbook' and 'Wear'.", description = "Enables swapping of 'Spellbook' and 'Wear'.",
position = 6, position = 6,
group = "Equipment swapper" group = "Equipment swapper"
@@ -296,7 +297,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapExplorersRing", keyName = "swapExplorersRing",
name = "Swap Explorer's Ring", name = "Explorer's Ring",
description = "Enables swapping of 'Spellbook' and 'Wear'.", description = "Enables swapping of 'Spellbook' and 'Wear'.",
position = 7, position = 7,
group = "Equipment swapper" group = "Equipment swapper"
@@ -320,7 +321,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapQuestCape", keyName = "swapQuestCape",
name = "Swap Quest Cape", name = "Quest Cape",
description = "Enables swapping Quest cape options in worn interface.", description = "Enables swapping Quest cape options in worn interface.",
position = 9, position = 9,
group = "Equipment swapper" group = "Equipment swapper"
@@ -377,7 +378,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapCoalBag", keyName = "swapCoalBag",
name = "Swap Coal Bag Empty", name = "Coal Bag",
description = "Makes Empty the left click option when in a bank", description = "Makes Empty the left click option when in a bank",
position = 2, position = 2,
group = "Miscellaneous" group = "Miscellaneous"
@@ -664,7 +665,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapBuyOne", keyName = "swapBuyOne",
name = "Swappable Buy One", name = "Buy One",
description = "", description = "",
position = 0, position = 0,
group = "Shop / stores" group = "Shop / stores"
@@ -690,7 +691,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapBuyFive", keyName = "swapBuyFive",
name = "Swappable Buy Five", name = "Buy Five",
description = "", description = "",
position = 2, position = 2,
group = "Shop / stores" group = "Shop / stores"
@@ -716,7 +717,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapBuyTen", keyName = "swapBuyTen",
name = "Swappable Buy Ten", name = "Buy Ten",
description = "", description = "",
position = 4, position = 4,
group = "Shop / stores" group = "Shop / stores"
@@ -742,7 +743,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapBuyFifty", keyName = "swapBuyFifty",
name = "Swappable Buy Fifty", name = "Buy Fifty",
description = "", description = "",
position = 6, position = 6,
group = "Shop / stores" group = "Shop / stores"
@@ -768,7 +769,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapSellOne", keyName = "swapSellOne",
name = "Swappable Sell One", name = "Sell One",
description = "", description = "",
position = 8, position = 8,
group = "Shop / stores" group = "Shop / stores"
@@ -794,7 +795,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapSellFive", keyName = "swapSellFive",
name = "Swappable Sell Five", name = "Sell Five",
description = "", description = "",
position = 10, position = 10,
group = "Shop / stores" group = "Shop / stores"
@@ -820,7 +821,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapSellTen", keyName = "swapSellTen",
name = "Swappable Sell Ten", name = "Sell Ten",
description = "", description = "",
position = 12, position = 12,
group = "Shop / stores" group = "Shop / stores"
@@ -846,7 +847,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapSellFifty", keyName = "swapSellFifty",
name = "Swappable Sell Fifty", name = "Sell Fifty",
description = "", description = "",
position = 14, position = 14,
group = "Shop / stores" group = "Shop / stores"
@@ -881,29 +882,28 @@ public interface MenuEntrySwapperConfig extends Config
position = 0, position = 0,
group = "Skilling" group = "Skilling"
) )
default boolean getEasyConstruction() default boolean getEasyConstruction()
{ {
return true; return true;
} }
@ConfigItem( @ConfigItem(
keyName = "getEasyConstructionItems", keyName = "getConstructionMode",
name = "Build Items", name = "EZ Construction Type",
description = "", description = "",
position = 1, position = 1,
group = "Skilling", group = "Skilling",
hidden = true, hidden = true,
unhide = "getEasyConstruction" unhide = "getEasyConstruction"
) )
default String getEasyConstructionItems() default ConstructionMode getConstructionMode()
{ {
return ""; return ConstructionMode.LARDER;
} }
@ConfigItem( @ConfigItem(
keyName = "swapTanning", keyName = "swapTanning",
name = "Swap Tanning", name = "Tanning",
description = "Enables swapping of 'Tan-1' and 'Tan-all' options.", description = "Enables swapping of 'Tan-1' and 'Tan-all' options.",
position = 2, position = 2,
group = "Skilling" group = "Skilling"
@@ -915,7 +915,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapSawmill", keyName = "swapSawmill",
name = "Swap Sawmill Operator", name = "Sawmill Operator",
description = "Makes 'Buy-plank' the default option on the Sawmill Operator.", description = "Makes 'Buy-plank' the default option on the Sawmill Operator.",
position = 3, position = 3,
group = "Skilling" group = "Skilling"
@@ -927,7 +927,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapSawmillPlanks", keyName = "swapSawmillPlanks",
name = "Swap Buy Planks", name = "Buy Planks",
description = "Makes 'Buy All' the default option when buying planks.", description = "Makes 'Buy All' the default option when buying planks.",
position = 4, position = 4,
group = "Skilling" group = "Skilling"
@@ -939,7 +939,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapPuroPuro", keyName = "swapPuroPuro",
name = "Swap Puro-Puro Wheat", name = "Puro-Puro Wheat",
description = "", description = "",
position = 5, position = 5,
group = "Skilling" group = "Skilling"
@@ -1204,7 +1204,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapGamesNecklace", keyName = "swapGamesNecklace",
name = "Swap Games Necklace", name = "Games Necklace",
description = "Swap the left click 'remove' option with the desired teleport location on a worn Games Necklace.", description = "Swap the left click 'remove' option with the desired teleport location on a worn Games Necklace.",
position = 7, position = 7,
group = "Teleportation" group = "Teleportation"
@@ -1230,7 +1230,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapDuelingRing", keyName = "swapDuelingRing",
name = "Swap Dueling Ring", name = "Dueling Ring",
description = "Swap the left click 'remove' option with the desired teleport location on a worn Ring of Dueling.", description = "Swap the left click 'remove' option with the desired teleport location on a worn Ring of Dueling.",
position = 9, position = 9,
group = "Teleportation" group = "Teleportation"
@@ -1256,7 +1256,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapGlory", keyName = "swapGlory",
name = "Swap Glory", name = "Glory",
description = "Swap the left click 'remove' option with the desired teleport location on a worn Amulet of Glory / Amulet of Eternal Glory.", description = "Swap the left click 'remove' option with the desired teleport location on a worn Amulet of Glory / Amulet of Eternal Glory.",
position = 11, position = 11,
group = "Teleportation" group = "Teleportation"
@@ -1282,7 +1282,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapSkill", keyName = "swapSkill",
name = "Swap Skill", name = "Skills Necklace",
description = "Swap the left click 'remove' option with the desired teleport location on a worn Skills Necklace.", description = "Swap the left click 'remove' option with the desired teleport location on a worn Skills Necklace.",
position = 13, position = 13,
group = "Teleportation" group = "Teleportation"
@@ -1308,7 +1308,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapPassage", keyName = "swapPassage",
name = "Swap Passage", name = "Passage Necklace",
description = "Swap the left click 'remove' option with the desired teleport location on a worn Necklace of Passage.", description = "Swap the left click 'remove' option with the desired teleport location on a worn Necklace of Passage.",
position = 15, position = 15,
group = "Teleportation" group = "Teleportation"
@@ -1334,7 +1334,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapDigsite", keyName = "swapDigsite",
name = "Swap Digsite", name = "Digsite Pendant",
description = "Swap the left click 'remove' option with the desired teleport location on a worn Digsite Pendant.", description = "Swap the left click 'remove' option with the desired teleport location on a worn Digsite Pendant.",
position = 17, position = 17,
group = "Teleportation" group = "Teleportation"
@@ -1360,7 +1360,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapCombat", keyName = "swapCombat",
name = "Swap Combat", name = "Combat Bracelet",
description = "Swap the left click 'remove' option with the desired teleport location on a worn Combat Bracelet.", description = "Swap the left click 'remove' option with the desired teleport location on a worn Combat Bracelet.",
position = 19, position = 19,
group = "Teleportation" group = "Teleportation"
@@ -1386,7 +1386,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapburning", keyName = "swapburning",
name = "Swap Burning", name = "Burning Amulet",
description = "Swap the left click 'remove' option with the desired teleport location on a worn Burning Amulet.", description = "Swap the left click 'remove' option with the desired teleport location on a worn Burning Amulet.",
position = 21, position = 21,
group = "Teleportation" group = "Teleportation"
@@ -1412,7 +1412,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapxeric", keyName = "swapxeric",
name = "Swap Xeric's", name = "Xeric's Talisman",
description = "Swap the left click 'remove' option with the desired teleport location on a worn Xeric's Talisman.", description = "Swap the left click 'remove' option with the desired teleport location on a worn Xeric's Talisman.",
position = 23, position = 23,
group = "Teleportation" group = "Teleportation"
@@ -1438,7 +1438,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapwealth", keyName = "swapwealth",
name = "Swap Wealth", name = "Ring of Wealth",
description = "Swap the left click 'remove' option with the desired teleport location on a worn Ring of Wealth.", description = "Swap the left click 'remove' option with the desired teleport location on a worn Ring of Wealth.",
position = 25, position = 25,
group = "Teleportation" group = "Teleportation"
@@ -1464,7 +1464,7 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "swapslayer", keyName = "swapslayer",
name = "Swap Slayer Ring", name = "Slayer Ring",
description = "", description = "",
position = 27, position = 27,
group = "Teleportation" group = "Teleportation"
@@ -1494,10 +1494,10 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "hideExamine", keyName = "hideExamine",
name = "Hide Examine", name = "Examine",
description = "Hides the 'Examine' option from the right click menu.", description = "Hides the 'Examine' option from the right click menu.",
position = 0, position = 0,
group = "Right Click Options" group = "Hide Right Click Options"
) )
default boolean hideExamine() default boolean hideExamine()
{ {
@@ -1506,10 +1506,10 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "hideTradeWith", keyName = "hideTradeWith",
name = "Hide Trade With", name = "Trade With",
description = "Hides the 'Trade with' option from the right click menu.", description = "Hides the 'Trade with' option from the right click menu.",
position = 1, position = 1,
group = "Right Click Options" group = "Hide Right Click Options"
) )
default boolean hideTradeWith() default boolean hideTradeWith()
{ {
@@ -1518,10 +1518,10 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "hideReport", keyName = "hideReport",
name = "Hide Report", name = "Report",
description = "Hides the 'Report' option from the right click menu.", description = "Hides the 'Report' option from the right click menu.",
position = 2, position = 2,
group = "Right Click Options" group = "Hide Right Click Options"
) )
default boolean hideReport() default boolean hideReport()
{ {
@@ -1530,10 +1530,10 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "hideLookup", keyName = "hideLookup",
name = "Hide Lookup", name = "Lookup",
description = "Hides the 'Lookup' option from the right click menu.", description = "Hides the 'Lookup' option from the right click menu.",
position = 3, position = 3,
group = "Right Click Options" group = "Hide Right Click Options"
) )
default boolean hideLookup() default boolean hideLookup()
{ {
@@ -1542,10 +1542,10 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "hideNet", keyName = "hideNet",
name = "Hide Net", name = "Net",
description = "Hides the 'Net' option from the right click menu.", description = "Hides the 'Net' option from the right click menu.",
position = 4, position = 4,
group = "Right Click Options" group = "Hide Right Click Options"
) )
default boolean hideNet() default boolean hideNet()
{ {
@@ -1554,10 +1554,10 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "hideBait", keyName = "hideBait",
name = "Hide Bait", name = "Bait",
description = "Hides the 'Bait' option from the right click menu.", description = "Hides the 'Bait' option from the right click menu.",
position = 5, position = 5,
group = "Right Click Options" group = "Hide Right Click Options"
) )
default boolean hideBait() default boolean hideBait()
{ {
@@ -1570,10 +1570,10 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "hideDestroyRunepouch", keyName = "hideDestroyRunepouch",
name = "Hide Destroy on Rune Pouch", name = "Destroy on Rune Pouch",
description = "Hides the 'Destroy' option when right clicking a Rune pouch.", description = "Hides the 'Destroy' option when right clicking a Rune pouch.",
position = 0, position = 0,
group = "Untradeables" group = "Hide Untradeable Options"
) )
default boolean hideDestroyRunepouch() default boolean hideDestroyRunepouch()
{ {
@@ -1582,10 +1582,10 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "hideDestroyCoalbag", keyName = "hideDestroyCoalbag",
name = "Hide Destroy on Coal bag", name = "Destroy on Coal bag",
description = "Hides the 'Destroy' option when right clicking a Coal bag.", description = "Hides the 'Destroy' option when right clicking a Coal bag.",
position = 1, position = 1,
group = "Untradeables" group = "Hide Untradeable Options"
) )
default boolean hideDestroyCoalbag() default boolean hideDestroyCoalbag()
{ {
@@ -1594,10 +1594,10 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "hideDestroyHerbsack", keyName = "hideDestroyHerbsack",
name = "Hide Destroy on Herb sack", name = "Destroy on Herb sack",
description = "Hides the 'Destroy' option when right clicking a Herb sack.", description = "Hides the 'Destroy' option when right clicking a Herb sack.",
position = 2, position = 2,
group = "Untradeables" group = "Hide Untradeable Options"
) )
default boolean hideDestroyHerbsack() default boolean hideDestroyHerbsack()
{ {
@@ -1606,10 +1606,10 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "hideDestroyBoltpouch", keyName = "hideDestroyBoltpouch",
name = "Hide Destroy on Bolt pouch", name = "Destroy on Bolt pouch",
description = "Hides the 'Destroy' option when right clicking a Bolt pouch.", description = "Hides the 'Destroy' option when right clicking a Bolt pouch.",
position = 3, position = 3,
group = "Untradeables" group = "Hide Untradeable Options"
) )
default boolean hideDestroyBoltpouch() default boolean hideDestroyBoltpouch()
{ {
@@ -1618,10 +1618,10 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "hideDestroyGembag", keyName = "hideDestroyGembag",
name = "Hide Destroy on Gem bag", name = "Destroy on Gem bag",
description = "Hides the 'Destroy' option when right clicking a Gem bag.", description = "Hides the 'Destroy' option when right clicking a Gem bag.",
position = 4, position = 4,
group = "Untradeables" group = "Hide Untradeable Options"
) )
default boolean hideDestroyGembag() default boolean hideDestroyGembag()
{ {
@@ -1630,10 +1630,10 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "hideDestroyLootingBag", keyName = "hideDestroyLootingBag",
name = "Hide Destroy on Looting bag", name = "Destroy on Looting bag",
description = "Hides the 'Destroy' option when right clicking a Looting bag.", description = "Hides the 'Destroy' option when right clicking a Looting bag.",
position = 5, position = 5,
group = "Untradeables" group = "Hide Untradeable Options"
) )
default boolean hideDestroyLootingBag() default boolean hideDestroyLootingBag()
{ {
@@ -1642,10 +1642,10 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem( @ConfigItem(
keyName = "hideDropRunecraftingPouch", keyName = "hideDropRunecraftingPouch",
name = "Hide Drop on RC pouches", name = "Drop on RC pouches",
description = "Hides the 'Drop' option when right clicking a Small, Medium, Large, or Giant pouch.", description = "Hides the 'Drop' option when right clicking a Small, Medium, Large, or Giant pouch.",
position = 6, position = 6,
group = "Untradeables" group = "Hide Untradeable Options"
) )
default boolean hideDropRunecraftingPouch() default boolean hideDropRunecraftingPouch()
{ {

View File

@@ -90,6 +90,7 @@ import net.runelite.client.plugins.menuentryswapper.util.BurningAmuletMode;
import net.runelite.client.plugins.menuentryswapper.util.CharterOption; import net.runelite.client.plugins.menuentryswapper.util.CharterOption;
import net.runelite.client.plugins.menuentryswapper.util.CombatBraceletMode; import net.runelite.client.plugins.menuentryswapper.util.CombatBraceletMode;
import net.runelite.client.plugins.menuentryswapper.util.ConstructionCapeMode; import net.runelite.client.plugins.menuentryswapper.util.ConstructionCapeMode;
import net.runelite.client.plugins.menuentryswapper.util.ConstructionMode;
import net.runelite.client.plugins.menuentryswapper.util.DigsitePendantMode; import net.runelite.client.plugins.menuentryswapper.util.DigsitePendantMode;
import net.runelite.client.plugins.menuentryswapper.util.DuelingRingMode; import net.runelite.client.plugins.menuentryswapper.util.DuelingRingMode;
import net.runelite.client.plugins.menuentryswapper.util.FairyRingMode; import net.runelite.client.plugins.menuentryswapper.util.FairyRingMode;
@@ -187,130 +188,130 @@ public class MenuEntrySwapperPlugin extends Plugin
@Setter(AccessLevel.PACKAGE) @Setter(AccessLevel.PACKAGE)
private boolean shiftModifier = false; private boolean shiftModifier = false;
private boolean getWithdrawOne; private ConstructionMode getConstructionMode;
private String getWithdrawOneItems; private BurningAmuletMode getBurningAmuletMode;
private boolean getWithdrawFive; private CharterOption charterOption;
private CombatBraceletMode getCombatBraceletMode;
private ConstructionCapeMode constructionCapeMode;
private DigsitePendantMode getDigsitePendantMode;
private DuelingRingMode getDuelingRingMode;
private FairyRingMode swapFairyRingMode;
private GamesNecklaceMode getGamesNecklaceMode;
private GloryMode getGloryMode;
private HouseMode swapHomePortalMode;
private MaxCapeMode maxMode;
private NecklaceOfPassageMode getNecklaceofPassageMode;
private ObeliskMode swapObeliskMode;
private OccultAltarMode swapOccultMode;
private QuestCapeMode questCapeMode;
private RingOfWealthMode getRingofWealthMode;
private Set<String> hideCastIgnoredCoX;
private Set<String> hideCastIgnoredToB;
private SkillsNecklaceMode getSkillsNecklaceMode;
private SlayerRingMode getSlayerRingMode;
private String configCustomSwaps;
private String getBuyFiftyItems;
private String getBuyFiveItems;
private String getBuyOneItems;
private String getBuyTenItems;
private String getRemovedObjects;
private String getSellFiftyItems;
private String getSellFiveItems;
private String getSellOneItems;
private String getSellTenItems;
private String getWithdrawAllItems;
private String getWithdrawFiveItems; private String getWithdrawFiveItems;
private boolean getWithdrawTen; private String getWithdrawOneItems;
private String getWithdrawTenItems; private String getWithdrawTenItems;
private boolean getWithdrawX;
private String getWithdrawXAmount; private String getWithdrawXAmount;
private String getWithdrawXItems; private String getWithdrawXItems;
private boolean getWithdrawAll; private XericsTalismanMode getXericsTalismanMode;
private String getWithdrawAllItems; private boolean getBurningAmulet;
private boolean swapMax; private boolean getCombatBracelet;
private MaxCapeMode maxMode; private boolean getDigsitePendant;
private boolean getSwapArdougneCape; private boolean getDuelingRing;
private boolean getSwapConstructionCape;
private ConstructionCapeMode constructionCapeMode;
private boolean getSwapCraftingCape;
private boolean getSwapMagicCape;
private boolean getSwapExplorersRing;
private boolean swapAdmire;
private boolean swapQuestCape;
private QuestCapeMode questCapeMode;
private String configCustomSwaps;
private boolean shiftClickCustomization;
private boolean swapCoalBag;
private boolean swapBirdhouseEmpty;
private boolean swapBones;
private boolean swapChase;
private boolean swapHarpoon;
private OccultAltarMode swapOccultMode;
private HouseMode swapHomePortalMode;
private boolean swapPrivate;
private boolean swapPick;
private boolean swapQuick;
private boolean swapBoxTrap;
private boolean rockCake;
private boolean swapRogueschests;
private boolean swapClimbUpDown;
private boolean swapStun;
private boolean swapSearch;
private boolean swapHardWoodGrove;
private boolean getRemoveObjects;
private String getRemovedObjects;
private boolean swapImps;
private CharterOption charterOption;
private boolean getSwapBuyOne;
private String getBuyOneItems;
private boolean getSwapBuyFive;
private String getBuyFiveItems;
private boolean getSwapBuyTen;
private String getBuyTenItems;
private boolean getSwapBuyFifty;
private String getBuyFiftyItems;
private boolean getSwapSellOne;
private String getSellOneItems;
private boolean getSwapSellFive;
private String getSellFiveItems;
private boolean getSwapSellTen;
private String getSellTenItems;
private boolean getSwapSellFifty;
private String getSellFiftyItems;
private boolean getEasyConstruction; private boolean getEasyConstruction;
private String getEasyConstructionItems; private boolean getGamesNecklace;
private boolean getSwapTanning; private boolean getGlory;
private boolean getNecklaceofPassage;
private boolean getRemoveObjects;
private boolean getRingofWealth;
private boolean getSkillsNecklace;
private boolean getSlayerRing;
private boolean getSwapArdougneCape;
private boolean getSwapBuyFifty;
private boolean getSwapBuyFive;
private boolean getSwapBuyOne;
private boolean getSwapBuyTen;
private boolean getSwapConstructionCape;
private boolean getSwapCraftingCape;
private boolean getSwapExplorersRing;
private boolean getSwapMagicCape;
private boolean getSwapPuro;
private boolean getSwapSawmill; private boolean getSwapSawmill;
private boolean getSwapSawmillPlanks; private boolean getSwapSawmillPlanks;
private boolean getSwapPuro; private boolean getSwapSellFifty;
private boolean swapAssignment; private boolean getSwapSellFive;
private boolean swapBankExchange; private boolean getSwapSellOne;
private boolean swapContract; private boolean getSwapSellTen;
private boolean swapInteract; private boolean getSwapTanning;
private boolean swapPickpocket; private boolean getWithdrawAll;
private boolean swapPay; private boolean getWithdrawFive;
private boolean swapAbyssTeleport; private boolean getWithdrawOne;
private boolean swapTrade; private boolean getWithdrawTen;
private boolean swapTravel; private boolean getWithdrawX;
private boolean swapMinigame;
private boolean swapPlank;
private boolean swapMetamorphosis;
private boolean swapEnchant;
private FairyRingMode swapFairyRingMode;
private ObeliskMode swapObeliskMode;
private boolean swapTeleportItem;
private boolean swapWildernessLever;
private boolean swapNexus;
private boolean getGamesNecklace;
private GamesNecklaceMode getGamesNecklaceMode;
private boolean getDuelingRing;
private DuelingRingMode getDuelingRingMode;
private boolean getGlory;
private GloryMode getGloryMode;
private boolean getSkillsNecklace;
private SkillsNecklaceMode getSkillsNecklaceMode;
private boolean getNecklaceofPassage;
private NecklaceOfPassageMode getNecklaceofPassageMode;
private boolean getDigsitePendant;
private DigsitePendantMode getDigsitePendantMode;
private boolean getCombatBracelet;
private CombatBraceletMode getCombatBraceletMode;
private boolean getBurningAmulet;
private BurningAmuletMode getBurningAmuletMode;
private boolean getXericsTalisman; private boolean getXericsTalisman;
private XericsTalismanMode getXericsTalismanMode; private boolean hideBait;
private boolean getRingofWealth; private boolean hideCastCoX;
private RingOfWealthMode getRingofWealthMode; private boolean hideCastToB;
private boolean getSlayerRing; private boolean hideDestroyBoltpouch;
private SlayerRingMode getSlayerRingMode; private boolean hideDestroyCoalbag;
private boolean hideDestroyGembag;
private boolean hideDestroyHerbsack;
private boolean hideDestroyLootingBag;
private boolean hideDestroyRunepouch;
private boolean hideDropRunecraftingPouch;
private boolean hideExamine; private boolean hideExamine;
private boolean hideTradeWith;
private boolean hideReport;
private boolean hideLookup; private boolean hideLookup;
private boolean hideNet; private boolean hideNet;
private boolean hideBait; private boolean hideReport;
private boolean hideDestroyRunepouch; private boolean hideTradeWith;
private boolean hideDestroyCoalbag; private boolean rockCake;
private boolean hideDestroyHerbsack; private boolean shiftClickCustomization;
private boolean hideDestroyBoltpouch; private boolean swapAbyssTeleport;
private boolean hideDestroyGembag; private boolean swapAdmire;
private boolean hideDestroyLootingBag; private boolean swapAssignment;
private boolean hideDropRunecraftingPouch; private boolean swapBankExchange;
private boolean hideCastToB; private boolean swapBirdhouseEmpty;
private Set<String> hideCastIgnoredToB; private boolean swapBones;
private boolean hideCastCoX; private boolean swapBoxTrap;
private Set<String> hideCastIgnoredCoX; private boolean swapChase;
private boolean swapClimbUpDown;
private boolean swapCoalBag;
private boolean swapContract;
private boolean swapEnchant;
private boolean swapHardWoodGrove;
private boolean swapHarpoon;
private boolean swapImps;
private boolean swapInteract;
private boolean swapMax;
private boolean swapMetamorphosis;
private boolean swapMinigame;
private boolean swapNexus;
private boolean swapPay;
private boolean swapPick;
private boolean swapPickpocket;
private boolean swapPlank;
private boolean swapPrivate;
private boolean swapQuestCape;
private boolean swapQuick;
private boolean swapRogueschests;
private boolean swapSearch;
private boolean swapStun;
private boolean swapTeleportItem;
private boolean swapTrade;
private boolean swapTravel;
private boolean swapWildernessLever;
@Provides @Provides
MenuEntrySwapperConfig provideConfig(ConfigManager configManager) MenuEntrySwapperConfig provideConfig(ConfigManager configManager)
@@ -324,7 +325,7 @@ public class MenuEntrySwapperPlugin extends Plugin
updateConfig(); updateConfig();
addSubscriptions(); addSubscriptions();
addSwaps(); addSwaps();
loadConstructionItems(config.getEasyConstructionItems()); loadConstructionItems();
if (config.shiftClickCustomization()) if (config.shiftClickCustomization())
{ {
@@ -345,7 +346,6 @@ public class MenuEntrySwapperPlugin extends Plugin
eventBus.unregister(this); eventBus.unregister(this);
disableCustomization(); disableCustomization();
loadConstructionItems("");
loadCustomSwaps(""); // Removes all custom swaps loadCustomSwaps(""); // Removes all custom swaps
removeSwaps(); removeSwaps();
@@ -378,7 +378,7 @@ public class MenuEntrySwapperPlugin extends Plugin
removeSwaps(); removeSwaps();
updateConfig(); updateConfig();
addSwaps(); addSwaps();
loadConstructionItems(this.getEasyConstructionItems); loadConstructionItems();
if (!CONFIG_GROUP.equals(event.getGroup())) if (!CONFIG_GROUP.equals(event.getGroup()))
{ {
@@ -492,7 +492,7 @@ public class MenuEntrySwapperPlugin extends Plugin
return; return;
} }
loadConstructionItems(this.getEasyConstructionItems); loadConstructionItems();
} }
private void onVarbitChanged(VarbitChanged event) private void onVarbitChanged(VarbitChanged event)
@@ -721,7 +721,6 @@ public class MenuEntrySwapperPlugin extends Plugin
return; return;
} }
final String pOptionToReplace = Text.removeTags(event.getOption()).toUpperCase();
final int eventId = event.getIdentifier(); final int eventId = event.getIdentifier();
final String option = Text.standardize(event.getOption()); final String option = Text.standardize(event.getOption());
final String target = Text.standardize(event.getTarget()); final String target = Text.standardize(event.getTarget());
@@ -1610,6 +1609,8 @@ public class MenuEntrySwapperPlugin extends Plugin
menuManager.removeSwap("Wield", "", "Rub"); menuManager.removeSwap("Wield", "", "Rub");
menuManager.removeSwap("Wear", "", "Teleport"); menuManager.removeSwap("Wear", "", "Teleport");
menuManager.removeSwap("Wield", "", "Teleport"); menuManager.removeSwap("Wield", "", "Teleport");
menuManager.removePriorityEntry(this.getConstructionMode.getBuild());
menuManager.removePriorityEntry(this.getConstructionMode.getRemove());
switch (this.swapFairyRingMode) switch (this.swapFairyRingMode)
{ {
@@ -1691,39 +1692,24 @@ public class MenuEntrySwapperPlugin extends Plugin
} }
} }
private void loadConstructionItems(String from) private void loadConstructionItems()
{ {
if (client.getGameState() != GameState.LOGGED_IN if (client.getGameState() != GameState.LOGGED_IN)
|| Strings.isNullOrEmpty(from) && leftClickConstructionItems.isEmpty())
{ {
return; return;
} }
if (!leftClickConstructionItems.isEmpty()) if (!buildingMode)
{ {
leftClickConstructionItems.forEach(item -> menuManager.removePriorityEntry(this.getConstructionMode.getBuild());
{ menuManager.removePriorityEntry(this.getConstructionMode.getRemove());
menuManager.removePriorityEntry("build", item); return;
menuManager.removePriorityEntry("remove", item);
});
leftClickConstructionItems.clear();
} }
if (this.getEasyConstruction && !Strings.isNullOrEmpty(from) && buildingMode) if (this.getEasyConstruction)
{ {
Text.fromCSV(from).forEach(item -> menuManager.addPriorityEntry(this.getConstructionMode.getBuild()).setPriority(100);
{ menuManager.addPriorityEntry(this.getConstructionMode.getRemove()).setPriority(100);
if (leftClickConstructionItems.contains(item))
{
return;
}
menuManager.addPriorityEntry("build", item).setPriority(100);
menuManager.addPriorityEntry("remove", item).setPriority(100);
leftClickConstructionItems.add(item);
});
} }
} }
@@ -1874,7 +1860,6 @@ public class MenuEntrySwapperPlugin extends Plugin
this.getSwapSellFifty = config.getSwapSellFifty(); this.getSwapSellFifty = config.getSwapSellFifty();
this.getSellFiftyItems = config.getSellFiftyItems(); this.getSellFiftyItems = config.getSellFiftyItems();
this.getEasyConstruction = config.getEasyConstruction(); this.getEasyConstruction = config.getEasyConstruction();
this.getEasyConstructionItems = config.getEasyConstructionItems();
this.getSwapTanning = config.getSwapTanning(); this.getSwapTanning = config.getSwapTanning();
this.getSwapSawmill = config.getSwapSawmill(); this.getSwapSawmill = config.getSwapSawmill();
this.getSwapSawmillPlanks = config.getSwapSawmillPlanks(); this.getSwapSawmillPlanks = config.getSwapSawmillPlanks();
@@ -1913,6 +1898,7 @@ public class MenuEntrySwapperPlugin extends Plugin
this.getCombatBraceletMode = config.getCombatBraceletMode(); this.getCombatBraceletMode = config.getCombatBraceletMode();
this.getBurningAmulet = config.getBurningAmulet(); this.getBurningAmulet = config.getBurningAmulet();
this.getBurningAmuletMode = config.getBurningAmuletMode(); this.getBurningAmuletMode = config.getBurningAmuletMode();
this.getConstructionMode = config.getConstructionMode();
this.getXericsTalisman = config.getXericsTalisman(); this.getXericsTalisman = config.getXericsTalisman();
this.getXericsTalismanMode = config.getXericsTalismanMode(); this.getXericsTalismanMode = config.getXericsTalismanMode();
this.getRingofWealth = config.getRingofWealth(); this.getRingofWealth = config.getRingofWealth();

View File

@@ -0,0 +1,40 @@
package net.runelite.client.plugins.menuentryswapper.util;
import lombok.AllArgsConstructor;
import lombok.Getter;
import net.runelite.client.menus.BaseComparableEntry;
import static net.runelite.client.menus.ComparableEntries.newBaseComparableEntry;
@Getter
@AllArgsConstructor
public enum ConstructionMode
{
BENCH("Benches",
newBaseComparableEntry("Remove", "bench", -1, -1, true, false),
newBaseComparableEntry("Build", "Seating space", -1, -1, true, true)),
CHAIR("Chairs",
newBaseComparableEntry("Remove", "chair", -1, -1, true, false),
newBaseComparableEntry("Build", "Chair space", -1, -1, true, true)),
DUNGEON("Dungeon Doors",
newBaseComparableEntry("Remove", "door", -1, -1, true, false),
newBaseComparableEntry("Build", "Door space", -1, -1, true, true)),
LARDER("Larders",
newBaseComparableEntry("Remove", "larder", -1, -1, true, false),
newBaseComparableEntry("Build", "Larder space", -1, -1, true, true)),
MYTH_CAPE("Myth Cape",
newBaseComparableEntry("Remove", "cape", -1, -1, true, false),
newBaseComparableEntry("Build", "Guild trophy space", -1, -1, true, true)),
TABLE("Tables",
newBaseComparableEntry("Remove", "table", -1, -1, true, false),
newBaseComparableEntry("Build", "Table space", -1, -1, true, true));
private final String name;
private final BaseComparableEntry build;
private final BaseComparableEntry remove;
@Override
public String toString()
{
return name;
}
}