WorldMap: Add teleport destinations for spells and jewellery
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Morgan Lewis <https://github.com/MESLewis>
|
||||
* 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 HOLDER 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.worldmap;
|
||||
|
||||
import lombok.Getter;
|
||||
import net.runelite.api.ItemID;
|
||||
import net.runelite.api.coords.WorldPoint;
|
||||
|
||||
@Getter
|
||||
enum JewelleryTeleportLocationData
|
||||
{
|
||||
BARBARIAN_ASSAULT(ItemID.GAMES_NECKLACE8, "Barbarian Assault", new WorldPoint(2520, 3571, 0), "games_necklace_teleport_icon.png"),
|
||||
BURTHORPE_GAMES_ROOM(ItemID.GAMES_NECKLACE8, "Burthorpe Games Room", new WorldPoint(2898, 3554, 0), "games_necklace_teleport_icon.png"),
|
||||
TEARS_OF_GUTHIX(ItemID.GAMES_NECKLACE8, "Tears of Guthix", new WorldPoint(3245, 9500, 0), "games_necklace_teleport_icon.png"),
|
||||
CORPOREAL_BEAST(ItemID.GAMES_NECKLACE8, "Corporeal Beast", new WorldPoint(2967, 4384, 0), "games_necklace_teleport_icon.png"),
|
||||
WINTERTODT_CAMP(ItemID.GAMES_NECKLACE8, "Wintertodt Camp", new WorldPoint(1624, 3938, 0), "games_necklace_teleport_icon.png"),
|
||||
DUEL_ARENA(ItemID.RING_OF_DUELING8, "Duel Arena", new WorldPoint(3315, 3235, 0), "ring_of_dueling_teleport_icon.png"),
|
||||
CLAN_WARS(ItemID.RING_OF_DUELING8, "Clan Wars", new WorldPoint(3387, 3158, 0), "ring_of_dueling_teleport_icon.png"),
|
||||
CASTLE_WARS(ItemID.RING_OF_DUELING8, "Castle Wars", new WorldPoint(2441, 3091, 0), "ring_of_dueling_teleport_icon.png"),
|
||||
WARRIORS_GUILD(ItemID.COMBAT_BRACELET6, "Warriors' Guild", new WorldPoint(2883, 3549, 0), "combat_bracelet_teleport_icon.png"),
|
||||
CHAMPIONS_GUILD(ItemID.COMBAT_BRACELET6, "Champions' Guild", new WorldPoint(3189, 3368, 0), "combat_bracelet_teleport_icon.png"),
|
||||
EDGEVILLE_MONASTERY(ItemID.COMBAT_BRACELET6, "Edgeville Monastery", new WorldPoint(3053, 3487, 0), "combat_bracelet_teleport_icon.png"),
|
||||
RANGING_GUILD(ItemID.COMBAT_BRACELET6, "Ranging Guild", new WorldPoint(2654, 3441, 0), "combat_bracelet_teleport_icon.png"),
|
||||
FISHING_GUILD(ItemID.SKILLS_NECKLACE6, "Fishing Guild", new WorldPoint(2613, 3390, 0), "skills_necklace_teleport_icon.png"),
|
||||
MINING_GUILD(ItemID.SKILLS_NECKLACE6, "Mining Guild", new WorldPoint(3049, 9762, 0), "skills_necklace_teleport_icon.png"),
|
||||
CRAFTING_GUILD(ItemID.SKILLS_NECKLACE6, "Crafting Guild", new WorldPoint(2934, 3294, 0), "skills_necklace_teleport_icon.png"),
|
||||
COOKING_GUILD(ItemID.SKILLS_NECKLACE6, "Cooking Guild", new WorldPoint(3145, 3438, 0), "skills_necklace_teleport_icon.png"),
|
||||
WOODCUTTING_GUILD(ItemID.SKILLS_NECKLACE6, "Woodcutting Guild", new WorldPoint(1662, 3505, 0), "skills_necklace_teleport_icon.png"),
|
||||
EDGEVILLE(ItemID.AMULET_OF_GLORY, "Edgeville", new WorldPoint(3087, 3496, 0), "amulet_of_glory_teleport_icon.png"),
|
||||
KARAMJA(ItemID.AMULET_OF_GLORY, "Karamja", new WorldPoint(2918, 3176, 0), "amulet_of_glory_teleport_icon.png"),
|
||||
DRAYNOR_VILLAGE(ItemID.AMULET_OF_GLORY, "Draynor Village", new WorldPoint(3105, 3251, 0), "amulet_of_glory_teleport_icon.png"),
|
||||
AL_KHARID(ItemID.AMULET_OF_GLORY, "Al-Kharid", new WorldPoint(3293, 3163, 0), "amulet_of_glory_teleport_icon.png"),
|
||||
MISCELLANIA(ItemID.AMULET_OF_GLORY, "Miscellania", new WorldPoint(2535, 3862, 0), "ring_of_wealth_teleport_icon.png"),
|
||||
GRAND_EXCHANGE(ItemID.RING_OF_WEALTH, "Grand Exchange", new WorldPoint(3162, 3480, 0), "ring_of_wealth_teleport_icon.png"),
|
||||
FALADOR_PARK(ItemID.RING_OF_WEALTH, "Falador Park", new WorldPoint(2995, 3375, 0), "ring_of_wealth_teleport_icon.png"),
|
||||
DONDAKAN(ItemID.RING_OF_WEALTH, "Dondakan", new WorldPoint(2831, 10165, 0), "ring_of_wealth_teleport_icon.png"),
|
||||
SLAYER_TOWER(ItemID.SLAYER_RING_8, "Slayer Tower", new WorldPoint(3429, 3531, 0), "slayer_ring_teleport_icon.png"),
|
||||
FREMENNIK_SLAYER_DUNGEON(ItemID.SLAYER_RING_8, "Fremennik Slayer Dungeon", new WorldPoint(2800, 9998, 0), "slayer_ring_teleport_icon.png"),
|
||||
TARNS_LAIR(ItemID.SLAYER_RING_8, "Tarn's Lair", new WorldPoint(3187, 4601, 0), "slayer_ring_teleport_icon.png"),
|
||||
STRONGHOLD_SLAYER_CAVE(ItemID.SLAYER_RING_8, "Stronghold Slayer Cave", new WorldPoint(2433, 3421, 0), "slayer_ring_teleport_icon.png"),
|
||||
DARK_BEASTS(ItemID.SLAYER_RING_8, "Dark Beasts", new WorldPoint(2028, 4638, 0), "slayer_ring_teleport_icon.png"),
|
||||
DIGSITE(ItemID.DIGSITE_PENDANT_5, "Digsite", new WorldPoint(3339, 3445, 0), "digsite_pendant_teleport_icon.png"),
|
||||
HOUSE_ON_THE_HILL(ItemID.DIGSITE_PENDANT_5, "House on the Hill", new WorldPoint(3763, 3869, 0), "digsite_pendant_teleport_icon.png"),
|
||||
LITHKREN(ItemID.DIGSITE_PENDANT_5, "Lithkren", new WorldPoint(3547, 10456, 0), "digsite_pendant_teleport_icon.png"),
|
||||
WIZARDS_TOWER(ItemID.NECKLACE_OF_PASSAGE5, "Wizards' Tower", new WorldPoint(3114, 3181, 0), "necklace_of_passage_teleport_icon.png"),
|
||||
JORRALS_OUTPOST(ItemID.NECKLACE_OF_PASSAGE5, "Jorral's Outpost", new WorldPoint(2431, 3348, 0), "necklace_of_passage_teleport_icon.png"),
|
||||
DESERT_EAGLE_STATION(ItemID.NECKLACE_OF_PASSAGE5, "Desert eagle station of the eagle transport system", new WorldPoint(3406, 3157, 0), "necklace_of_passage_teleport_icon.png"),
|
||||
CHAOS_TEMPLE(ItemID.BURNING_AMULET5, "Chaos Temple (lvl 15)", new WorldPoint(3234, 3637, 0), "burning_amulet_teleport_icon.png"),
|
||||
BANDIT_CAMP(ItemID.BURNING_AMULET5, "Bandit Camp (lvl 17)", new WorldPoint(3038, 3651, 0), "burning_amulet_teleport_icon.png"),
|
||||
LAVA_MAZE(ItemID.BURNING_AMULET5, "Lava Maze (lvl 41)", new WorldPoint(3028, 3840, 0), "burning_amulet_teleport_icon.png");
|
||||
|
||||
private final int itemID;
|
||||
private final String destionation;
|
||||
private final WorldPoint location;
|
||||
private final String iconPath;
|
||||
|
||||
JewelleryTeleportLocationData(int itemID, String destination, WorldPoint location, String iconPath)
|
||||
{
|
||||
this.itemID = itemID;
|
||||
this.destionation = destination;
|
||||
this.location = location;
|
||||
this.iconPath = iconPath;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Morgan Lewis <https://github.com/MESLewis>
|
||||
* 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 HOLDER 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.worldmap;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.imageio.ImageIO;
|
||||
import lombok.Getter;
|
||||
import net.runelite.client.game.ItemManager;
|
||||
import net.runelite.client.ui.overlay.worldmap.WorldMapPoint;
|
||||
|
||||
class JewelleryTeleportPoint extends WorldMapPoint
|
||||
{
|
||||
@Getter
|
||||
private final JewelleryTeleportLocationData data;
|
||||
|
||||
JewelleryTeleportPoint(JewelleryTeleportLocationData data, ItemManager itemManager)
|
||||
{
|
||||
super(data.getLocation(), WorldMapPlugin.BLANK_ICON);
|
||||
|
||||
this.data = data;
|
||||
String itemName = itemManager.getItemComposition(data.getItemID()).getName().replaceAll("\\(.*\\)", "");
|
||||
setTooltip(itemName + " - " + data.getDestionation());
|
||||
|
||||
try
|
||||
{
|
||||
setImage(ImageIO.read(WorldMapPlugin.class.getResourceAsStream(data.getIconPath())));
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Morgan Lewis <https://github.com/MESLewis>
|
||||
* 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 HOLDER 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.worldmap;
|
||||
|
||||
import lombok.Getter;
|
||||
import net.runelite.api.coords.WorldPoint;
|
||||
|
||||
@Getter
|
||||
enum MagicTeleportLocationData
|
||||
{
|
||||
VARROCK(TeleportType.NORMAL_MAGIC, "Varrock", 25, new WorldPoint(3213, 3424, 0), "varrock_teleport_icon.png"),
|
||||
VARROCK_GE(TeleportType.NORMAL_MAGIC, "Varrock GE", 25, new WorldPoint(3164, 3478, 0), "varrock_teleport_icon.png"),
|
||||
LUMBRIDGE(TeleportType.NORMAL_MAGIC, "Lumbridge", 31, new WorldPoint(3222, 3218, 0), "lumbridge_teleport_icon.png"),
|
||||
FALADOR(TeleportType.NORMAL_MAGIC, "Falador", 37, new WorldPoint(2965, 3381, 0), "falador_teleport_icon.png"),
|
||||
CAMELOT(TeleportType.NORMAL_MAGIC, "Camelot", 45, new WorldPoint(2757, 3477, 0), "camelot_teleport_icon.png"),
|
||||
CAMELOT_BANK(TeleportType.NORMAL_MAGIC, "Camelot Bank", 45, new WorldPoint(2726, 3485, 0), "camelot_teleport_icon.png"),
|
||||
ARDOUGNE(TeleportType.NORMAL_MAGIC, "Ardougne", 51, new WorldPoint(2664, 3306, 0), "ardougne_teleport_icon.png"),
|
||||
WATCHTOWER(TeleportType.NORMAL_MAGIC, "Watchtower", 58, new WorldPoint(2547, 3114, 0), "watchtower_teleport_icon.png"),
|
||||
WATCHTOWER_YANILLE(TeleportType.NORMAL_MAGIC, "Watchtower Yanille", 58, new WorldPoint(2584, 3097, 0), "watchtower_teleport_icon.png"),
|
||||
TROLLHEIM(TeleportType.NORMAL_MAGIC, "Trollheim", 61, new WorldPoint(2891, 3678, 0), "trollheim_teleport_icon.png"),
|
||||
APE_ATOLL(TeleportType.NORMAL_MAGIC, "Ape Atoll", 64, new WorldPoint(2796, 2791, 0), "ape_atoll_teleport_icon.png"),
|
||||
KOUREND(TeleportType.NORMAL_MAGIC, "Kourend", 69, new WorldPoint(1643, 3672, 0), "kourend_teleport_icon.png"),
|
||||
PADDEWWA(TeleportType.ANCIENT_MAGICKS, "Paddewwa", 54, new WorldPoint(3097, 9880, 0), "paddewwa_teleport_icon.png"),
|
||||
SENNTISTEN(TeleportType.ANCIENT_MAGICKS, "Senntisten", 60, new WorldPoint(3319, 3336, 0), "senntisten_teleport_icon.png"),
|
||||
KHARYRLL(TeleportType.ANCIENT_MAGICKS, "Kharyrll", 66, new WorldPoint(3494, 3473, 0), "kharyrll_teleport_icon.png"),
|
||||
LASSAR(TeleportType.ANCIENT_MAGICKS, "Lassar", 72, new WorldPoint(3002, 3472, 0), "lassar_teleport_icon.png"),
|
||||
DAREEYAK(TeleportType.ANCIENT_MAGICKS, "Dareeyak", 78, new WorldPoint(2969, 3695, 0), "dareeyak_teleport_icon.png"),
|
||||
CARRALLANGAR(TeleportType.ANCIENT_MAGICKS, "Carrallangar", 84, new WorldPoint(3157, 3667, 0), "carrallangar_teleport_icon.png"),
|
||||
ANNAKARL(TeleportType.ANCIENT_MAGICKS, "Annakarl", 90, new WorldPoint(3288, 3888, 0), "annakarl_teleport_icon.png"),
|
||||
GHORROCK(TeleportType.ANCIENT_MAGICKS, "Ghorrock", 96, new WorldPoint(2977, 3872, 0), "ghorrock_teleport_icon.png"),
|
||||
MOONCLAN(TeleportType.LUNAR_MAGIC, "Moonclan", 69, new WorldPoint(2113, 3915, 0), "moonclan_teleport_icon.png"),
|
||||
OURANIA(TeleportType.LUNAR_MAGIC, "Ourania", 71, new WorldPoint(2468, 3246, 0), "ourania_teleport_icon.png"),
|
||||
WATERBIRTH(TeleportType.LUNAR_MAGIC, "Waterbirth", 72, new WorldPoint(2546, 3755, 0), "waterbirth_teleport_icon.png"),
|
||||
BARBARIAN(TeleportType.LUNAR_MAGIC, "Barbarian", 75, new WorldPoint(2543, 3568, 0), "barbarian_teleport_icon.png"),
|
||||
KHAZARD(TeleportType.LUNAR_MAGIC, "Khazard", 78, new WorldPoint(2636, 3167, 0), "khazard_teleport_icon.png"),
|
||||
FISHING_GUILD(TeleportType.LUNAR_MAGIC, "Fishing Guild", 85, new WorldPoint(2612, 3391, 0), "fishing_guild_teleport_icon.png"),
|
||||
CATHERBY(TeleportType.LUNAR_MAGIC, "Catherby", 87, new WorldPoint(2802, 3449, 0), "catherby_teleport_icon.png"),
|
||||
ICE_PLATEAU(TeleportType.LUNAR_MAGIC, "Ice Plateau", 89, new WorldPoint(2973, 3939, 0), "ice_plateau_teleport_icon.png"),
|
||||
LUMBRIDGE_GRAVEYARD(TeleportType.ARCEUUS_MAGIC, "Lumbridge Graveyard", 6, new WorldPoint(3241, 3194, 0), "lumbridge_graveyard_teleport_icon.png"),
|
||||
DRAYNOR_MANOR(TeleportType.ARCEUUS_MAGIC, "Draynor Manor", 17, new WorldPoint(3108, 3352, 0), "draynor_manor_teleport_icon.png"),
|
||||
MIND_ALTAR(TeleportType.ARCEUUS_MAGIC, "Mind Altar", 28, new WorldPoint(2979, 3509, 0), "mind_altar_teleport_icon.png"),
|
||||
SALVE_GRAVEYARD(TeleportType.ARCEUUS_MAGIC, "Salve Graveyard", 40, new WorldPoint(3433, 3461, 0), "salve_graveyard_teleport_icon.png"),
|
||||
FENKENSTRAINS_CASTLE(TeleportType.ARCEUUS_MAGIC, "Fenkenstrain's Castle", 48, new WorldPoint(3548, 3528, 0), "fenkenstrains_castle_teleport_icon.png"),
|
||||
WEST_ARDOUGNE(TeleportType.ARCEUUS_MAGIC, "West Ardougne", 61, new WorldPoint(2500, 3291, 0), "west_ardougne_teleport_icon.png"),
|
||||
HARMONY_ISLAND(TeleportType.ARCEUUS_MAGIC, "Harmony Island", 65, new WorldPoint(3797, 2866, 0), "harmony_island_teleport_icon.png"),
|
||||
CEMETERY(TeleportType.ARCEUUS_MAGIC, "Cemetery", 71, new WorldPoint(2978, 3763, 0), "cemetery_teleport_icon.png"),
|
||||
BARROWS(TeleportType.ARCEUUS_MAGIC, "Barrows", 83, new WorldPoint(3565, 3315, 0), "barrows_teleport_icon.png"),
|
||||
APE_ATOLL_ARCEUUS(TeleportType.ARCEUUS_MAGIC, "Ape Atoll", 90, new WorldPoint(2771, 9102, 0), "ape_atoll_teleport_icon_arceuus.png");
|
||||
|
||||
private final TeleportType type;
|
||||
private final String tooltip;
|
||||
private final int magicLevel;
|
||||
private final WorldPoint location;
|
||||
private final String iconPath;
|
||||
|
||||
MagicTeleportLocationData(TeleportType type, String destination, int magicLevel, WorldPoint location, String iconPath)
|
||||
{
|
||||
this.type = type;
|
||||
this.tooltip = type.getPrefix() + " " + destination + " - lvl " + magicLevel;
|
||||
this.magicLevel = magicLevel;
|
||||
this.location = location;
|
||||
this.iconPath = iconPath;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Morgan Lewis <https://github.com/MESLewis>
|
||||
* 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 HOLDER 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.worldmap;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.imageio.ImageIO;
|
||||
import lombok.Getter;
|
||||
import net.runelite.client.ui.overlay.worldmap.WorldMapPoint;
|
||||
|
||||
class MagicTeleportPoint extends WorldMapPoint
|
||||
{
|
||||
@Getter
|
||||
private final MagicTeleportLocationData data;
|
||||
|
||||
MagicTeleportPoint(MagicTeleportLocationData data)
|
||||
{
|
||||
super(data.getLocation(), WorldMapPlugin.BLANK_ICON);
|
||||
|
||||
this.data = data;
|
||||
setTooltip(data.getTooltip());
|
||||
|
||||
try
|
||||
{
|
||||
setImage(ImageIO.read(WorldMapPlugin.class.getResourceAsStream(data.getIconPath())));
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Morgan Lewis <https://github.com/MESLewis>
|
||||
* 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 HOLDER 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.worldmap;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public enum TeleportType
|
||||
{
|
||||
NORMAL_MAGIC(""),
|
||||
ANCIENT_MAGICKS("Ancient - "),
|
||||
LUNAR_MAGIC("Lunar - "),
|
||||
ARCEUUS_MAGIC("Arceuus - ");
|
||||
|
||||
private String prefix;
|
||||
|
||||
TeleportType(String prefix)
|
||||
{
|
||||
this.prefix = prefix;
|
||||
}
|
||||
}
|
||||
@@ -57,4 +57,59 @@ public interface WorldMapConfig extends Config
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = WorldMapPlugin.CONFIG_KEY_NORMAL_TELEPORT_ICON,
|
||||
name = "Show standard spellbook destionations",
|
||||
description = "Show icons at the destinations for teleports in the standard spellbook",
|
||||
position = 5
|
||||
)
|
||||
default boolean normalTeleportIcon()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = WorldMapPlugin.CONFIG_KEY_ANCIENT_TELEPORT_ICON,
|
||||
name = "Show ancient magicks destionations",
|
||||
description = "Show icons at the destinations for teleports in the ancient spellbook",
|
||||
position = 6
|
||||
)
|
||||
default boolean ancientTeleportIcon()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = WorldMapPlugin.CONFIG_KEY_LUNAR_TELEPORT_ICON,
|
||||
name = "Show lunar spellbook destionations",
|
||||
description = "Show icons at the destinations for teleports in the lunar spellbook",
|
||||
position = 7
|
||||
)
|
||||
default boolean lunarTeleportIcon()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = WorldMapPlugin.CONFIG_KEY_ARCEUUS_TELEPORT_ICON,
|
||||
name = "Show arceuus spellbook destionations",
|
||||
description = "Show icons at the destinations for teleports in the arceuus spellbook",
|
||||
position = 8
|
||||
)
|
||||
default boolean arceuusTeleportIcon()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = WorldMapPlugin.CONFIG_KEY_JEWELLERY_TELEPORT_ICON,
|
||||
name = "Show jewellery teleport locations",
|
||||
description = "Show icons at the destinations for teleports from jewellery",
|
||||
position = 9
|
||||
)
|
||||
default boolean jewelleryTeleportIcon()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ import java.util.Arrays;
|
||||
import javax.imageio.ImageIO;
|
||||
import net.runelite.api.events.ConfigChanged;
|
||||
import net.runelite.client.config.ConfigManager;
|
||||
import net.runelite.client.game.ItemManager;
|
||||
import net.runelite.client.plugins.Plugin;
|
||||
import net.runelite.client.plugins.PluginDescriptor;
|
||||
import net.runelite.client.ui.overlay.worldmap.WorldMapPointManager;
|
||||
@@ -49,6 +50,11 @@ public class WorldMapPlugin extends Plugin
|
||||
static final String CONFIG_KEY = "worldmap";
|
||||
static final String CONFIG_KEY_FAIRY_RING_TOOLTIPS = "fairyRingTooltips";
|
||||
static final String CONFIG_KEY_FAIRY_RING_ICON = "fairyRingIcon";
|
||||
static final String CONFIG_KEY_NORMAL_TELEPORT_ICON = "standardSpellbookIcon";
|
||||
static final String CONFIG_KEY_ANCIENT_TELEPORT_ICON = "ancientSpellbookIcon";
|
||||
static final String CONFIG_KEY_LUNAR_TELEPORT_ICON = "lunarSpellbookIcon";
|
||||
static final String CONFIG_KEY_ARCEUUS_TELEPORT_ICON = "arceuusSpellbookIcon";
|
||||
static final String CONFIG_KEY_JEWELLERY_TELEPORT_ICON = "jewelleryIcon";
|
||||
|
||||
static
|
||||
{
|
||||
@@ -72,6 +78,9 @@ public class WorldMapPlugin extends Plugin
|
||||
}
|
||||
}
|
||||
|
||||
@Inject
|
||||
private ItemManager itemManager;
|
||||
|
||||
@Inject
|
||||
private WorldMapConfig config;
|
||||
|
||||
@@ -106,6 +115,25 @@ public class WorldMapPlugin extends Plugin
|
||||
case CONFIG_KEY_FAIRY_RING_ICON:
|
||||
FairyRingLocation.setIcon(config.fairyRingIcon() ? FAIRY_TRAVEL_ICON : BLANK_ICON);
|
||||
break;
|
||||
case CONFIG_KEY_NORMAL_TELEPORT_ICON:
|
||||
case CONFIG_KEY_ANCIENT_TELEPORT_ICON:
|
||||
case CONFIG_KEY_LUNAR_TELEPORT_ICON:
|
||||
case CONFIG_KEY_ARCEUUS_TELEPORT_ICON:
|
||||
worldMapPointManager.removeIf(MagicTeleportPoint.class::isInstance);
|
||||
createMagicTeleportPoints();
|
||||
break;
|
||||
case CONFIG_KEY_JEWELLERY_TELEPORT_ICON:
|
||||
if (config.jewelleryTeleportIcon())
|
||||
{
|
||||
Arrays.stream(JewelleryTeleportLocationData.values())
|
||||
.map(data -> new JewelleryTeleportPoint(data, itemManager))
|
||||
.forEach(worldMapPointManager::add);
|
||||
}
|
||||
else
|
||||
{
|
||||
worldMapPointManager.removeIf(JewelleryTeleportPoint.class::isInstance);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -121,11 +149,50 @@ public class WorldMapPlugin extends Plugin
|
||||
.map(FairyRingLocation::getFairyRingPoint)
|
||||
.forEach(worldMapPointManager::add);
|
||||
}
|
||||
|
||||
if (config.normalTeleportIcon()
|
||||
|| config.ancientTeleportIcon()
|
||||
|| config.lunarTeleportIcon()
|
||||
|| config.arceuusTeleportIcon())
|
||||
{
|
||||
createMagicTeleportPoints();
|
||||
}
|
||||
|
||||
if (config.jewelleryTeleportIcon())
|
||||
{
|
||||
Arrays.stream(JewelleryTeleportLocationData.values())
|
||||
.map(data -> new JewelleryTeleportPoint(data, itemManager))
|
||||
.forEach(worldMapPointManager::add);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void shutDown() throws Exception
|
||||
{
|
||||
worldMapPointManager.removeIf(FairyRingPoint.class::isInstance);
|
||||
worldMapPointManager.removeIf(MagicTeleportPoint.class::isInstance);
|
||||
worldMapPointManager.removeIf(JewelleryTeleportPoint.class::isInstance);
|
||||
}
|
||||
|
||||
private void createMagicTeleportPoints()
|
||||
{
|
||||
Arrays.stream(MagicTeleportLocationData.values())
|
||||
.filter(data ->
|
||||
{
|
||||
switch (data.getType())
|
||||
{
|
||||
case NORMAL_MAGIC:
|
||||
return config.normalTeleportIcon();
|
||||
case ANCIENT_MAGICKS:
|
||||
return config.ancientTeleportIcon();
|
||||
case LUNAR_MAGIC:
|
||||
return config.lunarTeleportIcon();
|
||||
case ARCEUUS_MAGIC:
|
||||
return config.arceuusTeleportIcon();
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}).map(MagicTeleportPoint::new)
|
||||
.forEach(worldMapPointManager::add);
|
||||
}
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 393 B |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 686 B |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 380 B |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 733 B |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 384 B |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 399 B |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 751 B |
|
After Width: | Height: | Size: 398 B |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 747 B |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 692 B |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 674 B |
|
After Width: | Height: | Size: 372 B |
|
After Width: | Height: | Size: 742 B |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 437 B |
|
After Width: | Height: | Size: 437 B |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 396 B |
|
After Width: | Height: | Size: 433 B |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 754 B |
|
After Width: | Height: | Size: 17 KiB |