Add quick pass/travel/start menu entry swapping
Closes #2226 Closes #1459 Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
@@ -187,6 +187,17 @@ public interface MenuEntrySwapperConfig extends Config
|
|||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 14,
|
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",
|
keyName = "swapBoxTrap",
|
||||||
name = "Reset",
|
name = "Reset",
|
||||||
description = "Swap Check with Reset on box trap"
|
description = "Swap Check with Reset on box trap"
|
||||||
@@ -197,7 +208,7 @@ public interface MenuEntrySwapperConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 15,
|
position = 16,
|
||||||
keyName = "swapTeleportItem",
|
keyName = "swapTeleportItem",
|
||||||
name = "Teleport item",
|
name = "Teleport item",
|
||||||
description = "Swap Wear, Wield with Rub, Teleport on teleport item<br>Example: Amulet of glory, Ardougne cloak, Chronicle"
|
description = "Swap Wear, Wield with Rub, Teleport on teleport item<br>Example: Amulet of glory, Ardougne cloak, Chronicle"
|
||||||
@@ -208,7 +219,7 @@ public interface MenuEntrySwapperConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 16,
|
position = 17,
|
||||||
keyName = "swapAbyssTeleport",
|
keyName = "swapAbyssTeleport",
|
||||||
name = "Teleport to Abyss",
|
name = "Teleport to Abyss",
|
||||||
description = "Swap Talk-to with Teleport for the Mage of Zamorak"
|
description = "Swap Talk-to with Teleport for the Mage of Zamorak"
|
||||||
@@ -219,7 +230,7 @@ public interface MenuEntrySwapperConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 17,
|
position = 18,
|
||||||
keyName = "swapTrade",
|
keyName = "swapTrade",
|
||||||
name = "Trade",
|
name = "Trade",
|
||||||
description = "Swap Talk-to with Trade on NPC<br>Example: Shop keeper, Shop assistant"
|
description = "Swap Talk-to with Trade on NPC<br>Example: Shop keeper, Shop assistant"
|
||||||
@@ -230,7 +241,7 @@ public interface MenuEntrySwapperConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 18,
|
position = 19,
|
||||||
keyName = "swapTravel",
|
keyName = "swapTravel",
|
||||||
name = "Travel",
|
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"
|
description = "Swap Talk-to with Travel, Take-boat, Pay-fare, Charter on NPC<br>Example: Squire, Monk of Entrana, Customs officer, Trader Crewmember"
|
||||||
|
|||||||
@@ -396,6 +396,11 @@ public class MenuEntrySwapperPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
swap("decant", option, target, true);
|
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"))
|
else if (config.swapTravel() && option.equals("pass") && target.equals("energy barrier"))
|
||||||
{
|
{
|
||||||
@@ -464,6 +469,18 @@ public class MenuEntrySwapperPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
swap("empty", option, target, true);
|
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"))
|
else if (config.shiftClickCustomization() && shiftModifier && !option.equals("use"))
|
||||||
{
|
{
|
||||||
Integer customOption = getSwapConfig(itemId);
|
Integer customOption = getSwapConfig(itemId);
|
||||||
|
|||||||
Reference in New Issue
Block a user