Skip to content

Commit

Permalink
Menu Swapper - Add Age/Assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
tr33s authored and jplsek committed Jun 20, 2018
1 parent 2c10066 commit b7357e0
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,4 +232,26 @@ default boolean swapTravel()
{
return true;
}

@ConfigItem(
position = 18,
keyName = "swapAge",
name = "Age",
description = "Swap Talk-to with Age for Hans"
)
default boolean swapAge()
{
return true;
}

@ConfigItem(
position = 19,
keyName = "swapAssignment",
name = "Assignment",
description = "Swap Talk-to with Assignment for Slayer Masters. This will take priority over swapping Trade."
)
default boolean swapAssignment()
{
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,12 @@ public void onMenuEntryAdded(MenuEntryAdded event)
swap("exchange", option, target, true);
}

// make sure assignment swap is higher priority than trade swap for slayer masters
if (config.swapAssignment())
{
swap("assignment", option, target, true);
}

if (config.swapTrade())
{
swap("trade", option, target, true);
Expand Down Expand Up @@ -379,6 +385,11 @@ public void onMenuEntryAdded(MenuEntryAdded event)
{
swap("pay", option, target, true);
}

if (config.swapAge())
{
swap("age", option, target, true);
}
}
else if (config.swapTravel() && option.equals("pass") && target.equals("energy barrier"))
{
Expand Down

0 comments on commit b7357e0

Please sign in to comment.