Menu Entry Swapper: Added Fairy Tree (poh) functionality (#1555)

* Menu Entry Swapper: Fairy Tree's

Menu Entry Swapper: Fairy Tree's

credit to @Sunha7

* Update MenuEntrySwapperConfig.java

* Update FairyTreeMode.java

* Update FairyTreeMode.java

* Update MenuEntrySwapperPlugin.java
This commit is contained in:
Kyle
2019-09-12 13:11:21 +01:00
committed by GitHub
parent 8d88e15738
commit 0d3122fce1
3 changed files with 141 additions and 29 deletions

View File

@@ -39,6 +39,7 @@ 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;
import net.runelite.client.plugins.menuentryswapper.util.FairyTreeMode;
import net.runelite.client.plugins.menuentryswapper.util.GamesNecklaceMode; import net.runelite.client.plugins.menuentryswapper.util.GamesNecklaceMode;
import net.runelite.client.plugins.menuentryswapper.util.GloryMode; import net.runelite.client.plugins.menuentryswapper.util.GloryMode;
import net.runelite.client.plugins.menuentryswapper.util.HouseMode; import net.runelite.client.plugins.menuentryswapper.util.HouseMode;
@@ -1177,12 +1178,38 @@ public interface MenuEntrySwapperConfig extends Config
{ {
return FairyRingMode.LAST_DESTINATION; return FairyRingMode.LAST_DESTINATION;
} }
@ConfigItem(
keyName = "swapFairyTree",
name = "Fairy Tree",
description = "Swap options on PoH Fairy Tree",
position = 2,
group = "Teleportation"
)
default boolean swapFairyTree()
{
return false;
}
@ConfigItem(
keyName = "fairyTree",
name = "Mode",
description = "",
position = 3,
group = "Teleportation",
hidden = true,
unhide = "swapFairyTree"
)
default FairyTreeMode swapFairyTreeMode()
{
return FairyTreeMode.RING_LAST_DESTINATION;
}
@ConfigItem( @ConfigItem(
keyName = "swapObelisk", keyName = "swapObelisk",
name = "Obelisk", name = "Obelisk",
description = "Swap the options on wilderness obelisks between 'Activate', 'Set destination' or 'Teleport to destination'.", description = "Swap the options on wilderness obelisks between 'Activate', 'Set destination' or 'Teleport to destination'.",
position = 2, position = 4,
group = "Teleportation" group = "Teleportation"
) )
default boolean swapObelisk() default boolean swapObelisk()
@@ -1194,7 +1221,7 @@ public interface MenuEntrySwapperConfig extends Config
keyName = "obelisk", keyName = "obelisk",
name = "Mode", name = "Mode",
description = "", description = "",
position = 3, position = 5,
group = "Teleportation", group = "Teleportation",
hidden = true, hidden = true,
unhide = "swapObelisk" unhide = "swapObelisk"
@@ -1208,7 +1235,7 @@ public interface MenuEntrySwapperConfig extends Config
keyName = "swapTeleportItem", keyName = "swapTeleportItem",
name = "Teleport Items", name = "Teleport Items",
description = "Swap 'Wear' or 'Wield' with 'Rub' or 'Teleport' on teleport items.<br>Example: Amulet of glory, Explorer's ring, Chronicle.", description = "Swap 'Wear' or 'Wield' with 'Rub' or 'Teleport' on teleport items.<br>Example: Amulet of glory, Explorer's ring, Chronicle.",
position = 4, position = 6,
group = "Teleportation" group = "Teleportation"
) )
default boolean swapTeleportItem() default boolean swapTeleportItem()
@@ -1220,7 +1247,7 @@ public interface MenuEntrySwapperConfig extends Config
keyName = "swapWildernessLever", keyName = "swapWildernessLever",
name = "Wilderness Lever", name = "Wilderness Lever",
description = "Swap the wilderness lever left click to be Edgeville/Ardougne.", description = "Swap the wilderness lever left click to be Edgeville/Ardougne.",
position = 5, position = 7,
group = "Teleportation" group = "Teleportation"
) )
default boolean swapWildernessLever() default boolean swapWildernessLever()
@@ -1232,7 +1259,7 @@ public interface MenuEntrySwapperConfig extends Config
keyName = "swapNexus", keyName = "swapNexus",
name = "Portal Nexus", name = "Portal Nexus",
description = "Makes the teleport menu have priority over the left click destination on the portal nexus.", description = "Makes the teleport menu have priority over the left click destination on the portal nexus.",
position = 6, position = 8,
group = "Teleportation" group = "Teleportation"
) )
default boolean swapNexus() default boolean swapNexus()
@@ -1244,7 +1271,7 @@ public interface MenuEntrySwapperConfig extends Config
keyName = "swapGamesNecklace", keyName = "swapGamesNecklace",
name = "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 = 9,
group = "Teleportation" group = "Teleportation"
) )
default boolean getGamesNecklace() default boolean getGamesNecklace()
@@ -1256,7 +1283,7 @@ public interface MenuEntrySwapperConfig extends Config
keyName = "gamesNecklaceMode", keyName = "gamesNecklaceMode",
name = "Mode", name = "Mode",
description = "", description = "",
position = 8, position = 10,
group = "Teleportation", group = "Teleportation",
hidden = true, hidden = true,
unhide = "swapGamesNecklace" unhide = "swapGamesNecklace"
@@ -1270,7 +1297,7 @@ public interface MenuEntrySwapperConfig extends Config
keyName = "swapDuelingRing", keyName = "swapDuelingRing",
name = "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 = 11,
group = "Teleportation" group = "Teleportation"
) )
default boolean getDuelingRing() default boolean getDuelingRing()
@@ -1282,7 +1309,7 @@ public interface MenuEntrySwapperConfig extends Config
keyName = "duelingRingMode", keyName = "duelingRingMode",
name = "Mode", name = "Mode",
description = "", description = "",
position = 10, position = 12,
group = "Teleportation", group = "Teleportation",
hidden = true, hidden = true,
unhide = "swapDuelingRing" unhide = "swapDuelingRing"
@@ -1296,7 +1323,7 @@ public interface MenuEntrySwapperConfig extends Config
keyName = "swapGlory", keyName = "swapGlory",
name = "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 = 13,
group = "Teleportation" group = "Teleportation"
) )
default boolean getGlory() default boolean getGlory()
@@ -1308,7 +1335,7 @@ public interface MenuEntrySwapperConfig extends Config
keyName = "gloryMode", keyName = "gloryMode",
name = "Mode", name = "Mode",
description = "", description = "",
position = 12, position = 14,
group = "Teleportation", group = "Teleportation",
hidden = true, hidden = true,
unhide = "swapGlory" unhide = "swapGlory"
@@ -1322,7 +1349,7 @@ public interface MenuEntrySwapperConfig extends Config
keyName = "swapSkill", keyName = "swapSkill",
name = "Skills Necklace", 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 = 15,
group = "Teleportation" group = "Teleportation"
) )
default boolean getSkillsNecklace() default boolean getSkillsNecklace()
@@ -1334,7 +1361,7 @@ public interface MenuEntrySwapperConfig extends Config
keyName = "skillsnecklacemode", keyName = "skillsnecklacemode",
name = "Mode", name = "Mode",
description = "", description = "",
position = 14, position = 16,
group = "Teleportation", group = "Teleportation",
hidden = true, hidden = true,
unhide = "swapSkill" unhide = "swapSkill"
@@ -1348,7 +1375,7 @@ public interface MenuEntrySwapperConfig extends Config
keyName = "swapPassage", keyName = "swapPassage",
name = "Passage Necklace", 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 = 17,
group = "Teleportation" group = "Teleportation"
) )
default boolean getNecklaceofPassage() default boolean getNecklaceofPassage()
@@ -1360,7 +1387,7 @@ public interface MenuEntrySwapperConfig extends Config
keyName = "necklaceofpassagemode", keyName = "necklaceofpassagemode",
name = "Mode", name = "Mode",
description = "", description = "",
position = 16, position = 18,
group = "Teleportation", group = "Teleportation",
hidden = true, hidden = true,
unhide = "swapPassage" unhide = "swapPassage"
@@ -1374,7 +1401,7 @@ public interface MenuEntrySwapperConfig extends Config
keyName = "swapDigsite", keyName = "swapDigsite",
name = "Digsite Pendant", 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 = 19,
group = "Teleportation" group = "Teleportation"
) )
default boolean getDigsitePendant() default boolean getDigsitePendant()
@@ -1386,7 +1413,7 @@ public interface MenuEntrySwapperConfig extends Config
keyName = "digsitependantmode", keyName = "digsitependantmode",
name = "Mode", name = "Mode",
description = "", description = "",
position = 18, position = 20,
group = "Teleportation", group = "Teleportation",
hidden = true, hidden = true,
unhide = "swapDigsite" unhide = "swapDigsite"
@@ -1400,7 +1427,7 @@ public interface MenuEntrySwapperConfig extends Config
keyName = "swapCombat", keyName = "swapCombat",
name = "Combat Bracelet", 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 = 21,
group = "Teleportation" group = "Teleportation"
) )
default boolean getCombatBracelet() default boolean getCombatBracelet()
@@ -1412,7 +1439,7 @@ public interface MenuEntrySwapperConfig extends Config
keyName = "combatbraceletmode", keyName = "combatbraceletmode",
name = "Mode", name = "Mode",
description = "", description = "",
position = 20, position = 22,
group = "Teleportation", group = "Teleportation",
hidden = true, hidden = true,
unhide = "swapCombat" unhide = "swapCombat"
@@ -1426,7 +1453,7 @@ public interface MenuEntrySwapperConfig extends Config
keyName = "swapburning", keyName = "swapburning",
name = "Burning Amulet", 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 = 23,
group = "Teleportation" group = "Teleportation"
) )
default boolean getBurningAmulet() default boolean getBurningAmulet()
@@ -1438,7 +1465,7 @@ public interface MenuEntrySwapperConfig extends Config
keyName = "burningamuletmode", keyName = "burningamuletmode",
name = "Mode", name = "Mode",
description = "", description = "",
position = 22, position = 24,
group = "Teleportation", group = "Teleportation",
hidden = true, hidden = true,
unhide = "swapburning" unhide = "swapburning"
@@ -1452,7 +1479,7 @@ public interface MenuEntrySwapperConfig extends Config
keyName = "swapxeric", keyName = "swapxeric",
name = "Xeric's Talisman", 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 = 25,
group = "Teleportation" group = "Teleportation"
) )
default boolean getXericsTalisman() default boolean getXericsTalisman()
@@ -1464,7 +1491,7 @@ public interface MenuEntrySwapperConfig extends Config
keyName = "xericstalismanmode", keyName = "xericstalismanmode",
name = "Mode", name = "Mode",
description = "", description = "",
position = 24, position = 26,
group = "Teleportation", group = "Teleportation",
hidden = true, hidden = true,
unhide = "swapxeric" unhide = "swapxeric"
@@ -1478,7 +1505,7 @@ public interface MenuEntrySwapperConfig extends Config
keyName = "swapwealth", keyName = "swapwealth",
name = "Ring of 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 = 27,
group = "Teleportation" group = "Teleportation"
) )
default boolean getRingofWealth() default boolean getRingofWealth()
@@ -1490,7 +1517,7 @@ public interface MenuEntrySwapperConfig extends Config
keyName = "ringofwealthmode", keyName = "ringofwealthmode",
name = "Mode", name = "Mode",
description = "", description = "",
position = 26, position = 28,
group = "Teleportation", group = "Teleportation",
hidden = true, hidden = true,
unhide = "swapwealth" unhide = "swapwealth"
@@ -1504,7 +1531,7 @@ public interface MenuEntrySwapperConfig extends Config
keyName = "swapslayer", keyName = "swapslayer",
name = "Slayer Ring", name = "Slayer Ring",
description = "", description = "",
position = 27, position = 29,
group = "Teleportation" group = "Teleportation"
) )
default boolean getSlayerRing() default boolean getSlayerRing()
@@ -1516,7 +1543,7 @@ public interface MenuEntrySwapperConfig extends Config
keyName = "slayerringmode", keyName = "slayerringmode",
name = "Mode", name = "Mode",
description = "", description = "",
position = 28, position = 30,
group = "Teleportation", group = "Teleportation",
hidden = true, hidden = true,
unhide = "swapslayer" unhide = "swapslayer"
@@ -1747,4 +1774,4 @@ public interface MenuEntrySwapperConfig extends Config
{ {
return "cure other, energy transfer, heal other, vengeance other"; return "cure other, energy transfer, heal other, vengeance other";
} }
} }

View File

@@ -89,6 +89,7 @@ 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;
import net.runelite.client.plugins.menuentryswapper.util.FairyTreeMode;
import net.runelite.client.plugins.menuentryswapper.util.GamesNecklaceMode; import net.runelite.client.plugins.menuentryswapper.util.GamesNecklaceMode;
import net.runelite.client.plugins.menuentryswapper.util.GloryMode; import net.runelite.client.plugins.menuentryswapper.util.GloryMode;
import net.runelite.client.plugins.menuentryswapper.util.HouseMode; import net.runelite.client.plugins.menuentryswapper.util.HouseMode;
@@ -178,6 +179,7 @@ public class MenuEntrySwapperPlugin extends Plugin
private DigsitePendantMode getDigsitePendantMode; private DigsitePendantMode getDigsitePendantMode;
private DuelingRingMode getDuelingRingMode; private DuelingRingMode getDuelingRingMode;
private FairyRingMode swapFairyRingMode; private FairyRingMode swapFairyRingMode;
private FairyTreeMode swapFairyTreeMode;
private GamesNecklaceMode getGamesNecklaceMode; private GamesNecklaceMode getGamesNecklaceMode;
private GloryMode getGloryMode; private GloryMode getGloryMode;
private HouseMode swapHomePortalMode; private HouseMode swapHomePortalMode;
@@ -1106,6 +1108,24 @@ public class MenuEntrySwapperPlugin extends Plugin
menuManager.addPriorityEntry("Last-destination", false); menuManager.addPriorityEntry("Last-destination", false);
break; break;
} }
switch (this.swapFairyTreeMode)
{
case OFF:
break;
case TREE:
menuManager.addPriorityEntry("Tree", "Spiritual Fairy Tree");
break;
case RING_ZANARIS:
menuManager.addPriorityEntry("Ring-Zanaris", "Spiritual Fairy Tree");
break;
case RING_CONFIGURE:
menuManager.addPriorityEntry("Ring-configure", "Spiritual Fairy Tree");
break;
case RING_LAST_DESTINATION:
menuManager.addPriorityEntry("Ring-last-destination", false);
break;
}
switch (this.swapOccultMode) switch (this.swapOccultMode)
{ {
@@ -1378,6 +1398,23 @@ public class MenuEntrySwapperPlugin extends Plugin
menuManager.removePriorityEntry("Last-destination", false); menuManager.removePriorityEntry("Last-destination", false);
break; break;
} }
switch (this.swapFairyTreeMode)
{
case OFF:
case TREE:
menuManager.removePriorityEntry("Tree", "Spiritual Fairy Tree");
break;
case RING_ZANARIS:
menuManager.removePriorityEntry("Ring-Zanaris", "Spiritual Fairy Tree");
break;
case RING_CONFIGURE:
menuManager.removePriorityEntry("Ring-configure", "Spiritual Fairy Tree");
break;
case RING_LAST_DESTINATION:
menuManager.removePriorityEntry("Ring-last-destination", false);
break;
}
switch (this.swapOccultMode) switch (this.swapOccultMode)
{ {
@@ -1707,6 +1744,7 @@ public class MenuEntrySwapperPlugin extends Plugin
this.swapContract = config.swapContract(); this.swapContract = config.swapContract();
this.swapEnchant = config.swapEnchant(); this.swapEnchant = config.swapEnchant();
this.swapFairyRingMode = config.swapFairyRingMode(); this.swapFairyRingMode = config.swapFairyRingMode();
this.swapFairyTreeMode = config.swapFairyTreeMode();
this.swapHardWoodGrove = config.swapHardWoodGrove(); this.swapHardWoodGrove = config.swapHardWoodGrove();
this.swapHarpoon = config.swapHarpoon(); this.swapHarpoon = config.swapHarpoon();
this.swapHomePortalMode = config.swapHomePortalMode(); this.swapHomePortalMode = config.swapHomePortalMode();
@@ -1851,4 +1889,4 @@ public class MenuEntrySwapperPlugin extends Plugin
setControlActive(false); setControlActive(false);
} }
}; };
} }

View File

@@ -0,0 +1,47 @@
/*
* Copyright (c) 2018, Ethan <http://github.com/shmeeps>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.client.plugins.menuentryswapper.util;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@Getter
@RequiredArgsConstructor
public enum FairyTreeMode
{
TREE("Tree"),
RING_ZANARIS("Zanaris"),
RING_CONFIGURE("Configure"),
RING_LAST_DESTINATION("Last-destination"),
OFF("Off");
private final String name;
@Override
public String toString()
{
return name;
}
}