menu swapper: Add uncharged cell swap for gotr (#14795)

This commit is contained in:
Mathew Hylkema
2022-03-28 17:25:42 +13:00
committed by GitHub
parent aeea3c9d47
commit 0609c246a5
2 changed files with 24 additions and 0 deletions

View File

@@ -837,4 +837,23 @@ public interface MenuEntrySwapperConfig extends Config
{
return false;
}
enum UnchargedCellsMode
{
TAKE,
TAKE_1,
TAKE_5,
TAKE_10
}
@ConfigItem(
keyName = "swapUnchargedCells",
name = "Uncharged Cells",
description = "Swap the take option for Uncharged Cells in Guardians of the Rift.",
section = objectSection
)
default UnchargedCellsMode swapUnchargedCells()
{
return UnchargedCellsMode.TAKE;
}
}

View File

@@ -70,6 +70,7 @@ import static net.runelite.client.plugins.menuentryswapper.MenuEntrySwapperConfi
import static net.runelite.client.plugins.menuentryswapper.MenuEntrySwapperConfig.KaramjaGlovesMode;
import static net.runelite.client.plugins.menuentryswapper.MenuEntrySwapperConfig.MorytaniaLegsMode;
import static net.runelite.client.plugins.menuentryswapper.MenuEntrySwapperConfig.RadasBlessingMode;
import static net.runelite.client.plugins.menuentryswapper.MenuEntrySwapperConfig.UnchargedCellsMode;
import net.runelite.client.util.Text;
@PluginDescriptor(
@@ -420,6 +421,10 @@ public class MenuEntrySwapperPlugin extends Plugin
swap("climb", "climb-down", () -> (shiftModifier() ? config.swapStairsShiftClick() : config.swapStairsLeftClick()) == MenuEntrySwapperConfig.StairsMode.CLIMB_DOWN);
swap("deposit", "deposit-runes", config::swapDepositPool);
swap("take", "uncharged cells", "take-1", () -> config.swapUnchargedCells() == UnchargedCellsMode.TAKE_1);
swap("take", "uncharged cells", "take-5", () -> config.swapUnchargedCells() == UnchargedCellsMode.TAKE_5);
swap("take", "uncharged cells", "take-10", () -> config.swapUnchargedCells() == UnchargedCellsMode.TAKE_10);
}
private void swap(String option, String swappedOption, Supplier<Boolean> enabled)