From fa615a07f2170093e95a162fa2197491caebc5d7 Mon Sep 17 00:00:00 2001 From: melkypie <5113962+melkypie@users.noreply.github.com> Date: Sat, 2 May 2020 15:27:26 +0300 Subject: [PATCH 1/2] worldmap: add tooltips to agility courses --- .../worldmap/AgilityCourseLocation.java | 61 +++++++++++++++++++ .../plugins/worldmap/AgilityCoursePoint.java | 42 +++++++++++++ .../plugins/worldmap/WorldMapConfig.java | 47 ++++++++------ .../plugins/worldmap/WorldMapPlugin.java | 18 ++++++ 4 files changed, 150 insertions(+), 18 deletions(-) create mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/worldmap/AgilityCourseLocation.java create mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/worldmap/AgilityCoursePoint.java diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/AgilityCourseLocation.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/AgilityCourseLocation.java new file mode 100644 index 0000000000..003916372e --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/AgilityCourseLocation.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2020, melky + * 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 AgilityCourseLocation +{ + AGILITY_PYRAMID("Agility Pyramid", new WorldPoint(3347, 2827, 0)), + AL_KHARID_ROOFTOP_COURSE("Al Kharid Rooftop Course", new WorldPoint(3272, 3195, 0)), + APE_ATOLL_AGILITY_COURSE("Ape Atoll Agility Course", new WorldPoint(2752, 2742, 0)), + ARDOUGNE_ROOFTOP_COURSE("Ardougne Rooftop Course", new WorldPoint(2673, 3298, 0)), + BARBARIAN_OUTPOST_AGILITY_COURSE("Barbarian Outpost Agility Course", new WorldPoint(2544, 3569, 0)), + BRIMHAVEN_AGILITY_ARENA("Brimhaven Agility Arena", new WorldPoint(2806, 3193, 0)), + CANIFIS_ROOFTOP_COURSE("Canifis Rooftop Course", new WorldPoint(3506, 3490, 0)), + DRAYNOR_VILLAGE_ROOFTOP_COURSE("Draynor Village Rooftop Course", new WorldPoint(3103, 3279, 0)), + FALADOR_ROOFTOP_COURSE("Falador Rooftop Course", new WorldPoint(3035, 3342, 0)), + GNOME_STRONGHOLD_AGILITY_COURSE("Gnome Stronghold Agility Course", new WorldPoint(2474, 3436, 0)), + PENGUIN_AGILITY_COURSE("Penguin Agility Course", new WorldPoint(2638, 4041, 0)), + POLLNIVNEACH_ROOFTOP_COURSE("Pollnivneach Rooftop Course", new WorldPoint(3350, 2963, 0)), + PRIFDDINAS_AGILITY_COURSE("Prifddinas Agility Course", new WorldPoint(3253, 6109, 0)), + RELLEKKA_ROOFTOP_COURSE("Rellekka Rooftop Course", new WorldPoint(2624, 3677, 0)), + SEERS_VILLAGE_ROOFTOP_COURSE("Seers' Village Rooftop Course", new WorldPoint(2728, 3488, 0)), + VARROCK_ROOFTOP_COURSE("Varrock Rooftop Course", new WorldPoint(3219, 3414, 0)), + WEREWOLF_AGILITY_COURSE("Werewolf Agility Course", new WorldPoint(3542, 3463, 0)), + WILDERNESS_AGILITY_COURSE("Wilderness Agility Course", new WorldPoint(2997, 3916, 0)); + + private final String tooltip; + private final WorldPoint location; + + AgilityCourseLocation(String tooltip, WorldPoint location) + { + this.tooltip = tooltip; + this.location = location; + } +} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/AgilityCoursePoint.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/AgilityCoursePoint.java new file mode 100644 index 0000000000..982f8db975 --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/AgilityCoursePoint.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2020, melky + * 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.awt.image.BufferedImage; +import net.runelite.client.ui.overlay.worldmap.WorldMapPoint; + +class AgilityCoursePoint extends WorldMapPoint +{ + AgilityCoursePoint(AgilityCourseLocation data, BufferedImage icon, boolean showTooltip) + { + super(data.getLocation(), icon); + + if (showTooltip) + { + setTooltip(data.getTooltip()); + } + } +} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapConfig.java index 704a451415..d401f36a4b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapConfig.java @@ -76,11 +76,22 @@ public interface WorldMapConfig extends Config return true; } + @ConfigItem( + keyName = WorldMapPlugin.CONFIG_KEY_AGILITY_COURSE_TOOLTIPS, + name = "Show agility course in tooltip", + description = "Displays the name of the agility course in the tooltip", + position = 5 + ) + default boolean agilityCourseTooltip() + { + return true; + } + @ConfigItem( keyName = WorldMapPlugin.CONFIG_KEY_NORMAL_TELEPORT_ICON, name = "Show Standard Spellbook destinations", description = "Show icons at the destinations for teleports in the Standard Spellbook", - position = 5 + position = 6 ) default boolean normalTeleportIcon() { @@ -91,7 +102,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_MINIGAME_TOOLTIP, name = "Show minigame name in tooltip", description = "Display the name of the minigame in the icon tooltip", - position = 6 + position = 7 ) default boolean minigameTooltip() { @@ -102,7 +113,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_ANCIENT_TELEPORT_ICON, name = "Show Ancient Magicks destinations", description = "Show icons at the destinations for teleports in the Ancient Spellbook", - position = 7 + position = 8 ) default boolean ancientTeleportIcon() { @@ -113,7 +124,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_LUNAR_TELEPORT_ICON, name = "Show Lunar Spellbook destinations", description = "Show icons at the destinations for teleports in the Lunar Spellbook", - position = 8 + position = 9 ) default boolean lunarTeleportIcon() { @@ -124,7 +135,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_ARCEUUS_TELEPORT_ICON, name = "Show Arceuus Spellbook destinations", description = "Show icons at the destinations for teleports in the Arceuus Spellbook", - position = 9 + position = 10 ) default boolean arceuusTeleportIcon() { @@ -135,7 +146,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_JEWELLERY_TELEPORT_ICON, name = "Show jewellery teleport locations", description = "Show icons at the destinations for teleports from jewellery", - position = 10 + position = 11 ) default boolean jewelleryTeleportIcon() { @@ -146,7 +157,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_SCROLL_TELEPORT_ICON, name = "Show teleport scroll locations", description = "Show icons at the destinations for teleports from scrolls", - position = 11 + position = 12 ) default boolean scrollTeleportIcon() { @@ -157,7 +168,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_MISC_TELEPORT_ICON, name = "Show misc teleport locations", description = "Show icons at the destinations for miscellaneous teleport items", - position = 12 + position = 13 ) default boolean miscellaneousTeleportIcon() { @@ -168,7 +179,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_QUEST_START_TOOLTIPS, name = "Show quest names and status", description = "Indicates the names of quests and shows completion status", - position = 13 + position = 14 ) default boolean questStartTooltips() { @@ -179,7 +190,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_FARMING_PATCH_TOOLTIPS, name = "Show farming patch type", description = "Display the type of farming patches in the icon tooltip", - position = 14 + position = 15 ) default boolean farmingPatchTooltips() { @@ -190,7 +201,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_RARE_TREE_TOOLTIPS, name = "Show rare tree type", description = "Display the type of rare tree in the icon tooltip", - position = 15 + position = 16 ) default boolean rareTreeTooltips() { @@ -201,7 +212,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_RARE_TREE_LEVEL_ICON, name = "Indicate unavailable trees", description = "Indicate rare trees you do not have the level to cut on the icon", - position = 16 + position = 17 ) default boolean rareTreeLevelIcon() { @@ -212,7 +223,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_TRANSPORATION_TELEPORT_TOOLTIPS, name = "Show transporation tooltips", description = "Indicates types and destinations of Transporation", - position = 17 + position = 18 ) default boolean transportationTeleportTooltips() { @@ -223,7 +234,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_RUNECRAFTING_ALTAR_ICON, name = "Show runecrafting altar locations", description = "Show the icons of runecrafting altars", - position = 18 + position = 19 ) default boolean runecraftingAltarIcon() { @@ -234,7 +245,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_MINING_SITE_TOOLTIPS, name = "Show mining site tooltips", description = "Indicates the ore available at mining sites", - position = 19 + position = 20 ) default boolean miningSiteTooltips() { @@ -245,7 +256,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_DUNGEON_TOOLTIPS, name = "Show dungeon tooltips", description = "Indicates the names of dungeons", - position = 20 + position = 21 ) default boolean dungeonTooltips() { @@ -256,7 +267,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_HUNTER_AREA_TOOLTIPS, name = "Show hunter area tooltips", description = "Indicates the creatures inside a hunting area", - position = 21 + position = 22 ) default boolean hunterAreaTooltips() { @@ -267,7 +278,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_FISHING_SPOT_TOOLTIPS, name = "Show fishing spot tooltips", description = "Indicates the type of fish fishable at the fishing spot", - position = 22 + position = 23 ) default boolean fishingSpotTooltips() { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapPlugin.java index 25c7a09ff7..f53c36baaf 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapPlugin.java @@ -67,6 +67,7 @@ public class WorldMapPlugin extends Plugin static final String CONFIG_KEY_FAIRY_RING_ICON = "fairyRingIcon"; static final String CONFIG_KEY_AGILITY_SHORTCUT_TOOLTIPS = "agilityShortcutTooltips"; static final String CONFIG_KEY_AGILITY_SHORTCUT_LEVEL_ICON = "agilityShortcutIcon"; + static final String CONFIG_KEY_AGILITY_COURSE_TOOLTIPS = "agilityCourseTooltips"; 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"; @@ -164,6 +165,7 @@ public class WorldMapPlugin extends Plugin worldMapPointManager.removeIf(RunecraftingAltarPoint.class::isInstance); worldMapPointManager.removeIf(DungeonPoint.class::isInstance); worldMapPointManager.removeIf(FishingSpotPoint.class::isInstance); + worldMapPointManager.removeIf(AgilityCoursePoint.class::isInstance); agilityLevel = 0; woodcuttingLevel = 0; } @@ -233,6 +235,21 @@ public class WorldMapPlugin extends Plugin } } + private void updateAgilityCourseIcons() + { + worldMapPointManager.removeIf(AgilityCoursePoint.class::isInstance); + + if (config.agilityCourseTooltip()) + { + Arrays.stream(AgilityCourseLocation.values()) + .filter(value -> value.getLocation() != null) + .map(value -> new AgilityCoursePoint(value, + BLANK_ICON, + config.agilityCourseTooltip())) + .forEach(worldMapPointManager::add); + } + } + private void updateRareTreeIcons() { worldMapPointManager.removeIf(RareTreePoint.class::isInstance); @@ -253,6 +270,7 @@ public class WorldMapPlugin extends Plugin private void updateShownIcons() { updateAgilityIcons(); + updateAgilityCourseIcons(); updateRareTreeIcons(); updateQuestStartPointIcons(); From 0e5829c97be901587564b8feb3df6437171f8a8e Mon Sep 17 00:00:00 2001 From: melkypie <5113962+melkypie@users.noreply.github.com> Date: Sat, 2 May 2020 15:33:17 +0300 Subject: [PATCH 2/2] worldmap: add the ability to indicate rooftop courses --- .../worldmap/AgilityCourseLocation.java | 2 + .../plugins/worldmap/WorldMapConfig.java | 47 +++++++++++------- .../plugins/worldmap/WorldMapPlugin.java | 10 +++- .../plugins/worldmap/rooftop_course_icon.png | Bin 0 -> 287 bytes 4 files changed, 39 insertions(+), 20 deletions(-) create mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/rooftop_course_icon.png diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/AgilityCourseLocation.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/AgilityCourseLocation.java index 003916372e..ee0c61db88 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/AgilityCourseLocation.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/AgilityCourseLocation.java @@ -52,10 +52,12 @@ enum AgilityCourseLocation private final String tooltip; private final WorldPoint location; + private final boolean rooftopCourse; AgilityCourseLocation(String tooltip, WorldPoint location) { this.tooltip = tooltip; this.location = location; + this.rooftopCourse = this.name().contains("ROOFTOP_COURSE"); } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapConfig.java index d401f36a4b..e3e11dccd9 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapConfig.java @@ -87,11 +87,22 @@ public interface WorldMapConfig extends Config return true; } + @ConfigItem( + keyName = WorldMapPlugin.CONFIG_KEY_AGILITY_COURSE_ROOFTOP_ICON, + name = "Indicate rooftop courses", + description = "Replace the agility icon with a mark of grace for rooftop courses", + position = 6 + ) + default boolean agilityCourseRooftop() + { + return true; + } + @ConfigItem( keyName = WorldMapPlugin.CONFIG_KEY_NORMAL_TELEPORT_ICON, name = "Show Standard Spellbook destinations", description = "Show icons at the destinations for teleports in the Standard Spellbook", - position = 6 + position = 7 ) default boolean normalTeleportIcon() { @@ -102,7 +113,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_MINIGAME_TOOLTIP, name = "Show minigame name in tooltip", description = "Display the name of the minigame in the icon tooltip", - position = 7 + position = 8 ) default boolean minigameTooltip() { @@ -113,7 +124,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_ANCIENT_TELEPORT_ICON, name = "Show Ancient Magicks destinations", description = "Show icons at the destinations for teleports in the Ancient Spellbook", - position = 8 + position = 9 ) default boolean ancientTeleportIcon() { @@ -124,7 +135,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_LUNAR_TELEPORT_ICON, name = "Show Lunar Spellbook destinations", description = "Show icons at the destinations for teleports in the Lunar Spellbook", - position = 9 + position = 10 ) default boolean lunarTeleportIcon() { @@ -135,7 +146,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_ARCEUUS_TELEPORT_ICON, name = "Show Arceuus Spellbook destinations", description = "Show icons at the destinations for teleports in the Arceuus Spellbook", - position = 10 + position = 11 ) default boolean arceuusTeleportIcon() { @@ -146,7 +157,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_JEWELLERY_TELEPORT_ICON, name = "Show jewellery teleport locations", description = "Show icons at the destinations for teleports from jewellery", - position = 11 + position = 12 ) default boolean jewelleryTeleportIcon() { @@ -157,7 +168,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_SCROLL_TELEPORT_ICON, name = "Show teleport scroll locations", description = "Show icons at the destinations for teleports from scrolls", - position = 12 + position = 13 ) default boolean scrollTeleportIcon() { @@ -168,7 +179,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_MISC_TELEPORT_ICON, name = "Show misc teleport locations", description = "Show icons at the destinations for miscellaneous teleport items", - position = 13 + position = 14 ) default boolean miscellaneousTeleportIcon() { @@ -179,7 +190,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_QUEST_START_TOOLTIPS, name = "Show quest names and status", description = "Indicates the names of quests and shows completion status", - position = 14 + position = 15 ) default boolean questStartTooltips() { @@ -190,7 +201,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_FARMING_PATCH_TOOLTIPS, name = "Show farming patch type", description = "Display the type of farming patches in the icon tooltip", - position = 15 + position = 16 ) default boolean farmingPatchTooltips() { @@ -201,7 +212,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_RARE_TREE_TOOLTIPS, name = "Show rare tree type", description = "Display the type of rare tree in the icon tooltip", - position = 16 + position = 17 ) default boolean rareTreeTooltips() { @@ -212,7 +223,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_RARE_TREE_LEVEL_ICON, name = "Indicate unavailable trees", description = "Indicate rare trees you do not have the level to cut on the icon", - position = 17 + position = 18 ) default boolean rareTreeLevelIcon() { @@ -223,7 +234,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_TRANSPORATION_TELEPORT_TOOLTIPS, name = "Show transporation tooltips", description = "Indicates types and destinations of Transporation", - position = 18 + position = 19 ) default boolean transportationTeleportTooltips() { @@ -234,7 +245,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_RUNECRAFTING_ALTAR_ICON, name = "Show runecrafting altar locations", description = "Show the icons of runecrafting altars", - position = 19 + position = 20 ) default boolean runecraftingAltarIcon() { @@ -245,7 +256,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_MINING_SITE_TOOLTIPS, name = "Show mining site tooltips", description = "Indicates the ore available at mining sites", - position = 20 + position = 21 ) default boolean miningSiteTooltips() { @@ -256,7 +267,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_DUNGEON_TOOLTIPS, name = "Show dungeon tooltips", description = "Indicates the names of dungeons", - position = 21 + position = 22 ) default boolean dungeonTooltips() { @@ -267,7 +278,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_HUNTER_AREA_TOOLTIPS, name = "Show hunter area tooltips", description = "Indicates the creatures inside a hunting area", - position = 22 + position = 23 ) default boolean hunterAreaTooltips() { @@ -278,7 +289,7 @@ public interface WorldMapConfig extends Config keyName = WorldMapPlugin.CONFIG_KEY_FISHING_SPOT_TOOLTIPS, name = "Show fishing spot tooltips", description = "Indicates the type of fish fishable at the fishing spot", - position = 23 + position = 24 ) default boolean fishingSpotTooltips() { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapPlugin.java index f53c36baaf..74741357e0 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapPlugin.java @@ -61,6 +61,7 @@ public class WorldMapPlugin extends Plugin private static final BufferedImage STARTED_ICON; private static final BufferedImage FINISHED_ICON; private static final BufferedImage MINING_SITE_ICON; + private static final BufferedImage ROOFTOP_COURSE_ICON; static final String CONFIG_KEY = "worldmap"; static final String CONFIG_KEY_FAIRY_RING_TOOLTIPS = "fairyRingTooltips"; @@ -68,6 +69,7 @@ public class WorldMapPlugin extends Plugin static final String CONFIG_KEY_AGILITY_SHORTCUT_TOOLTIPS = "agilityShortcutTooltips"; static final String CONFIG_KEY_AGILITY_SHORTCUT_LEVEL_ICON = "agilityShortcutIcon"; static final String CONFIG_KEY_AGILITY_COURSE_TOOLTIPS = "agilityCourseTooltips"; + static final String CONFIG_KEY_AGILITY_COURSE_ROOFTOP_ICON = "agilityCourseRooftopIcon"; 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"; @@ -120,6 +122,10 @@ public class WorldMapPlugin extends Plugin MINING_SITE_ICON = new BufferedImage(iconBufferSize, iconBufferSize, BufferedImage.TYPE_INT_ARGB); final BufferedImage miningSiteIcon = ImageUtil.getResourceStreamFromClass(WorldMapPlugin.class, "mining_site_icon.png"); MINING_SITE_ICON.getGraphics().drawImage(miningSiteIcon, 1, 1, null); + + ROOFTOP_COURSE_ICON = new BufferedImage(iconBufferSize, iconBufferSize, BufferedImage.TYPE_INT_ARGB); + final BufferedImage rooftopCourseIcon = ImageUtil.getResourceStreamFromClass(WorldMapPlugin.class, "rooftop_course_icon.png"); + ROOFTOP_COURSE_ICON.getGraphics().drawImage(rooftopCourseIcon, 1, 1, null); } @Inject @@ -239,12 +245,12 @@ public class WorldMapPlugin extends Plugin { worldMapPointManager.removeIf(AgilityCoursePoint.class::isInstance); - if (config.agilityCourseTooltip()) + if (config.agilityCourseTooltip() || config.agilityCourseRooftop()) { Arrays.stream(AgilityCourseLocation.values()) .filter(value -> value.getLocation() != null) .map(value -> new AgilityCoursePoint(value, - BLANK_ICON, + config.agilityCourseRooftop() && value.isRooftopCourse() ? ROOFTOP_COURSE_ICON : BLANK_ICON, config.agilityCourseTooltip())) .forEach(worldMapPointManager::add); } diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/rooftop_course_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/rooftop_course_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..27b548ad6ffa22710316d58de74a4012ef4b1dd2 GIT binary patch literal 287 zcmeAS@N?(olHy`uVBq!ia0vp^{2?NMQuIx`(nRvMLcuuc)2NYW4>Ealoaei&^M!{wSo+&kPhgrJ~ z+`YsKpSlL6_31b*G~J=x`dMA_wBntI$2|UB|NJbmNc??m{&T*k6Ys5`XKlYj`p~ot z&rMfsZTBjcI(+CTbIp9+wK`v-FCj8yYDdP|sN4UhuUTa=r;F)B&t{EP_cRXQpB2se zWx3OqrEWLb|6S%!cX)ks72nBgzb|eUp7e3)LHk#_FSnOXtrukfcqPLvP{FC`mfD+j dIr0Bj+eJACpUqh6>kf1`gQu&X%Q~loCIAH@ae@E< literal 0 HcmV?d00001