Merge pull request #5965 from deathbeam/quick-pass

Properly reorder menu entry config & add swaps for quick pass/travel/start
This commit is contained in:
Tomas Slusny
2018-10-12 21:15:00 +02:00
committed by GitHub
2 changed files with 209 additions and 181 deletions

View File

@@ -44,182 +44,6 @@ public interface MenuEntrySwapperConfig extends Config
@ConfigItem(
position = 1,
keyName = "swapBanker",
name = "Bank",
description = "Swap Talk-to with Bank on Bank NPC<br>Example: Banker"
)
default boolean swapBank()
{
return true;
}
@ConfigItem(
position = 2,
keyName = "swapBirdhouseEmpty",
name = "Birdhouse",
description = "Swap Interact with Empty for birdhouses on Fossil Island"
)
default boolean swapBirdhouseEmpty()
{
return true;
}
@ConfigItem(
position = 3,
keyName = "swapBones",
name = "Bury",
description = "Swap Bury with Use on Bones"
)
default boolean swapBones()
{
return true;
}
@ConfigItem(
position = 4,
keyName = "swapChase",
name = "Chase",
description = "Allows to left click your cat to chase"
)
default boolean swapChase()
{
return true;
}
@ConfigItem(
position = 5,
keyName = "claimSlime",
name = "Claim Slime",
description = "Swap Talk-to with Claim Slime from Morytania diaries"
)
default boolean claimSlime()
{
return true;
}
@ConfigItem(
position = 6,
keyName = "swapExchange",
name = "Exchange",
description = "Swap Talk-to with Exchange on NPC<br>Example: Grand Exchange Clerk, Tool Leprechaun, Void Knight"
)
default boolean swapExchange()
{
return true;
}
@ConfigItem(
position = 7,
keyName = "swapFairyRing",
name = "Fairy ring",
description = "Swap Zanaris with Last-destination or Configure on Fairy rings"
)
default FairyRingMode swapFairyRing()
{
return FairyRingMode.LAST_DESTINATION;
}
@ConfigItem(
position = 8,
keyName = "swapHarpoon",
name = "Harpoon",
description = "Swap Cage, Big Net with Harpoon on Fishing spot"
)
default boolean swapHarpoon()
{
return true;
}
@ConfigItem(
position = 9,
keyName = "swapHomePortal",
name = "Home",
description = "Swap Enter with Home or Build or Friend's house on Portal"
)
default HouseMode swapHomePortal()
{
return HouseMode.HOME;
}
@ConfigItem(
position = 10,
keyName = "swapPickpocket",
name = "Pickpocket on H.A.M.",
description = "Swap Talk-to with Pickpocket on H.A.M members"
)
default boolean swapPickpocket()
{
return true;
}
@ConfigItem(
position = 11,
keyName = "swapPay",
name = "Pay",
description = "Swap Talk-to with Pay on NPC<br>Example: Elstan, Heskel, Fayeth"
)
default boolean swapPay()
{
return true;
}
@ConfigItem(
position = 12,
keyName = "swapBoxTrap",
name = "Reset",
description = "Swap Check with Reset on box trap"
)
default boolean swapBoxTrap()
{
return true;
}
@ConfigItem(
position = 13,
keyName = "swapTeleportItem",
name = "Teleport item",
description = "Swap Wear, Wield with Rub, Teleport on teleport item<br>Example: Amulet of glory, Ardougne cloak, Chronicle"
)
default boolean swapTeleportItem()
{
return false;
}
@ConfigItem(
position = 14,
keyName = "swapAbyssTeleport",
name = "Teleport to Abyss",
description = "Swap Talk-to with Teleport for the Mage of Zamorak"
)
default boolean swapAbyssTeleport()
{
return true;
}
@ConfigItem(
position = 15,
keyName = "swapTrade",
name = "Trade",
description = "Swap Talk-to with Trade on NPC<br>Example: Shop keeper, Shop assistant"
)
default boolean swapTrade()
{
return true;
}
@ConfigItem(
position = 16,
keyName = "swapTravel",
name = "Travel",
description = "Swap Talk-to with Travel, Take-boat, Pay-fare, Charter on NPC<br>Example: Squire, Monk of Entrana, Customs officer, Trader Crewmember"
)
default boolean swapTravel()
{
return true;
}
@ConfigItem(
position = 17,
keyName = "swapAssignment",
name = "Assignment",
description = "Swap Talk-to with Assignment for Slayer Masters. This will take priority over swapping Trade."
@@ -230,7 +54,62 @@ public interface MenuEntrySwapperConfig extends Config
}
@ConfigItem(
position = 18,
position = 2,
keyName = "swapBanker",
name = "Bank",
description = "Swap Talk-to with Bank on Bank NPC<br>Example: Banker"
)
default boolean swapBank()
{
return true;
}
@ConfigItem(
position = 3,
keyName = "swapBirdhouseEmpty",
name = "Birdhouse",
description = "Swap Interact with Empty for birdhouses on Fossil Island"
)
default boolean swapBirdhouseEmpty()
{
return true;
}
@ConfigItem(
position = 4,
keyName = "swapBones",
name = "Bury",
description = "Swap Bury with Use on Bones"
)
default boolean swapBones()
{
return true;
}
@ConfigItem(
position = 5,
keyName = "swapChase",
name = "Chase",
description = "Allows to left click your cat to chase"
)
default boolean swapChase()
{
return true;
}
@ConfigItem(
position = 6,
keyName = "claimSlime",
name = "Claim Slime",
description = "Swap Talk-to with Claim Slime from Morytania diaries"
)
default boolean claimSlime()
{
return true;
}
@ConfigItem(
position = 7,
keyName = "swapDecant",
name = "Decant",
description = "Swap Talk-to with Decant for Bob Barter and Murky Matt at the Grand Exchange."
@@ -239,4 +118,136 @@ public interface MenuEntrySwapperConfig extends Config
{
return false;
}
@ConfigItem(
position = 8,
keyName = "swapExchange",
name = "Exchange",
description = "Swap Talk-to with Exchange on NPC<br>Example: Grand Exchange Clerk, Tool Leprechaun, Void Knight"
)
default boolean swapExchange()
{
return true;
}
@ConfigItem(
position = 9,
keyName = "swapFairyRing",
name = "Fairy ring",
description = "Swap Zanaris with Last-destination or Configure on Fairy rings"
)
default FairyRingMode swapFairyRing()
{
return FairyRingMode.LAST_DESTINATION;
}
@ConfigItem(
position = 10,
keyName = "swapHarpoon",
name = "Harpoon",
description = "Swap Cage, Big Net with Harpoon on Fishing spot"
)
default boolean swapHarpoon()
{
return true;
}
@ConfigItem(
position = 11,
keyName = "swapHomePortal",
name = "Home",
description = "Swap Enter with Home or Build or Friend's house on Portal"
)
default HouseMode swapHomePortal()
{
return HouseMode.HOME;
}
@ConfigItem(
position = 12,
keyName = "swapPickpocket",
name = "Pickpocket on H.A.M.",
description = "Swap Talk-to with Pickpocket on H.A.M members"
)
default boolean swapPickpocket()
{
return true;
}
@ConfigItem(
position = 13,
keyName = "swapPay",
name = "Pay",
description = "Swap Talk-to with Pay on NPC<br>Example: Elstan, Heskel, Fayeth"
)
default boolean swapPay()
{
return true;
}
@ConfigItem(
position = 14,
keyName = "swapQuick",
name = "Quick Pass/Start/Travel",
description = "Swap Pass with Quick-Pass, Ring with Quick-Start and Talk-to with Quick-Travel"
)
default boolean swapQuick()
{
return true;
}
@ConfigItem(
position = 15,
keyName = "swapBoxTrap",
name = "Reset",
description = "Swap Check with Reset on box trap"
)
default boolean swapBoxTrap()
{
return true;
}
@ConfigItem(
position = 16,
keyName = "swapTeleportItem",
name = "Teleport item",
description = "Swap Wear, Wield with Rub, Teleport on teleport item<br>Example: Amulet of glory, Ardougne cloak, Chronicle"
)
default boolean swapTeleportItem()
{
return false;
}
@ConfigItem(
position = 17,
keyName = "swapAbyssTeleport",
name = "Teleport to Abyss",
description = "Swap Talk-to with Teleport for the Mage of Zamorak"
)
default boolean swapAbyssTeleport()
{
return true;
}
@ConfigItem(
position = 18,
keyName = "swapTrade",
name = "Trade",
description = "Swap Talk-to with Trade on NPC<br>Example: Shop keeper, Shop assistant"
)
default boolean swapTrade()
{
return true;
}
@ConfigItem(
position = 19,
keyName = "swapTravel",
name = "Travel",
description = "Swap Talk-to with Travel, Take-boat, Pay-fare, Charter on NPC<br>Example: Squire, Monk of Entrana, Customs officer, Trader Crewmember"
)
default boolean swapTravel()
{
return true;
}
}

View File

@@ -396,6 +396,11 @@ public class MenuEntrySwapperPlugin extends Plugin
{
swap("decant", option, target, true);
}
if (config.swapQuick())
{
swap("quick-travel", option, target, true);
}
}
else if (config.swapTravel() && option.equals("pass") && target.equals("energy barrier"))
{
@@ -460,6 +465,22 @@ public class MenuEntrySwapperPlugin extends Plugin
{
swap("chase", option, target, true);
}
else if (config.swapBirdhouseEmpty() && option.equals("interact") && target.contains("birdhouse"))
{
swap("empty", option, target, true);
}
else if (config.swapQuick())
{
switch (option)
{
case "ring":
swap("quick-start", option, target, true);
break;
case "pass":
swap("quick-pass", option, target, true);
break;
}
}
else if (config.shiftClickCustomization() && shiftModifier && !option.equals("use"))
{
Integer customOption = getSwapConfig(itemId);
@@ -486,10 +507,6 @@ public class MenuEntrySwapperPlugin extends Plugin
{
swap("use", option, target, true);
}
else if (config.swapBirdhouseEmpty() && option.equals("interact") && target.contains("birdhouse"))
{
swap("empty", option, target, true);
}
}
@Subscribe