From 75a8b2223380ad950afadfb45fb4b7eb3734b615 Mon Sep 17 00:00:00 2001 From: Broooklyn <54762282+Broooklyn@users.noreply.github.com> Date: Sat, 12 Dec 2020 19:51:13 -0500 Subject: [PATCH 1/9] worldmap: add Watson teleport scroll location --- .../runelite/client/plugins/worldmap/TeleportLocationData.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/TeleportLocationData.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/TeleportLocationData.java index d2753e8010..44fb0b0dfb 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/TeleportLocationData.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/TeleportLocationData.java @@ -187,7 +187,8 @@ enum TeleportLocationData TAI_BWO_WANNAI_SCROLL(TeleportType.SCROLL, "Tai Bwo Wannai Teleport", new WorldPoint(2788, 3066, 0), "scroll_teleport_icon.png"), ZULANDRA_SCROLL(TeleportType.SCROLL, "Zul-Andra Teleport", new WorldPoint(2197, 3056, 0), "scroll_teleport_icon.png"), KEY_MASTER_SCROLL(TeleportType.SCROLL, "Key Master Teleport", new WorldPoint(2686, 9882, 0), "scroll_teleport_icon.png"), - REVENANT_CAVE_SCROLL(TeleportType.SCROLL, "Revenant Cave Teleport", new WorldPoint(3127, 3833, 0), "scroll_teleport_icon.png"); + REVENANT_CAVE_SCROLL(TeleportType.SCROLL, "Revenant Cave Teleport", new WorldPoint(3127, 3833, 0), "scroll_teleport_icon.png"), + WATSON_SCROLL(TeleportType.SCROLL, "Watson Teleport", new WorldPoint(1645, 3579, 0), "scroll_teleport_icon.png"); private final TeleportType type; private final String tooltip; From a90d91421a9a756001dfd2dbc7562f8b774c674c Mon Sep 17 00:00:00 2001 From: Broooklyn <54762282+Broooklyn@users.noreply.github.com> Date: Wed, 13 Jan 2021 14:14:09 -0500 Subject: [PATCH 2/9] agility: Add Crabclaw Caves obstacles --- .../main/java/net/runelite/client/game/AgilityShortcut.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/game/AgilityShortcut.java b/runelite-client/src/main/java/net/runelite/client/game/AgilityShortcut.java index ad6c5e0925..20b99655fb 100644 --- a/runelite-client/src/main/java/net/runelite/client/game/AgilityShortcut.java +++ b/runelite-client/src/main/java/net/runelite/client/game/AgilityShortcut.java @@ -93,6 +93,9 @@ public enum AgilityShortcut YANILLE_UNDERWALL_TUNNEL(16, "Underwall Tunnel", new WorldPoint(2574, 3109, 0), HOLE_16520, CASTLE_WALL), KOUREND_CATACOMBS_SOUTH_WEST_CREVICE_NORTH(17, "Crevice", new WorldPoint(1647, 10008, 0), CRACK_28892), KOUREND_CATACOMBS_SOUTH_WEST_CREVICE_SOUTH(17, "Crevice", new WorldPoint(1645, 10001, 0), CRACK_28892), + CRABCLAW_CAVES_CREVICE(18, "Crevice", new WorldPoint(1710, 9822, 0), CREVICE_31695, CREVICE_31696), + CRABCLAW_CAVES_ROCKS(18, "Rocks", new WorldPoint(1687, 9802, 0), ROCKS_31697), + CRABCLAW_CAVES_STEPPING_STONES(18, "Stepping Stones", new WorldPoint(1704, 9800, 0), STEPPING_STONE_31699), YANILLE_WATCHTOWER_TRELLIS(18, "Trellis", null, TRELLIS_20056), COAL_TRUCKS_LOG_BALANCE(20, "Log Balance", new WorldPoint(2598, 3475, 0), LOG_BALANCE_23274), GRAND_EXCHANGE_UNDERWALL_TUNNEL(21, "Underwall Tunnel", new WorldPoint(3139, 3515, 0), UNDERWALL_TUNNEL_16529, UNDERWALL_TUNNEL_16530), From 80c9d82bdd53d7ea868660ce7e2f373a426834dc Mon Sep 17 00:00:00 2001 From: Broooklyn <54762282+Broooklyn@users.noreply.github.com> Date: Wed, 13 Jan 2021 14:15:02 -0500 Subject: [PATCH 3/9] worldmap: fix Crabclaw Caves Tunnel (quest) WorldPoint --- .../net/runelite/client/plugins/worldmap/DungeonLocation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/DungeonLocation.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/DungeonLocation.java index 1f5ee3bb0e..0df27cf60c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/DungeonLocation.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/DungeonLocation.java @@ -55,7 +55,7 @@ enum DungeonLocation CORSAIR_COVE_E("Corsair Cove Dungeon", new WorldPoint(2522, 2861, 0)), CORSAIR_COVE_N("Corsair Cove Dungeon", new WorldPoint(2482, 2891, 0)), CRABCLAW_CAVES("Crabclaw Caves", new WorldPoint(1643, 3449, 0)), - CRABCLAW_CAVES_TUNNEL("Crabclaw Caves Tunnel (quest)", new WorldPoint(1643, 3449, 0)), + CRABCLAW_CAVES_TUNNEL("Crabclaw Caves Tunnel (quest)", new WorldPoint(1671, 9800, 0)), CRANDOR("Crandor Dungeon", new WorldPoint(2833, 3256, 0)), CRASH_ISLAND("Crash Island Dungeon", new WorldPoint(2920, 2721, 0)), DEEP_WILDERNESS("Deep Wilderness Dungeon", new WorldPoint(3044, 3924, 0)), From c81390fb75b350bf1f08ec4eae03bf5f1c0d6840 Mon Sep 17 00:00:00 2001 From: jamesahhh Date: Thu, 14 Jan 2021 19:04:41 -0700 Subject: [PATCH 4/9] menu swapper: Add Skull sceptre invoke swap (#12944) --- .../client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java | 1 + 1 file changed, 1 insertion(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java index 225f358278..86487392eb 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java @@ -329,6 +329,7 @@ public class MenuEntrySwapperPlugin extends Plugin swap("wear", "rub", config::swapTeleportItem); swap("wear", "teleport", config::swapTeleportItem); swap("wield", "teleport", config::swapTeleportItem); + swap("wield", "invoke", config::swapTeleportItem); swap("bury", "use", config::swapBones); From 9492f982ad23540099abf3c330b6867e7abfcb72 Mon Sep 17 00:00:00 2001 From: Kevin Date: Fri, 15 Jan 2021 02:04:52 -0500 Subject: [PATCH 5/9] loottracker: Add opened bird nest ID to loot metadata (#12936) --- .../runelite/client/plugins/loottracker/LootTrackerPlugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java index b622aaaa41..c57ae05197 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java @@ -804,7 +804,7 @@ public class LootTrackerPlugin extends Plugin if (event.getMenuOption().equals("Search") && BIRDNEST_IDS.contains(event.getId())) { - setEvent(LootRecordType.EVENT, BIRDNEST_EVENT); + setEvent(LootRecordType.EVENT, BIRDNEST_EVENT, event.getId()); takeInventorySnapshot(); } From 7835f27d6a02353933dc03341c65feea680701d5 Mon Sep 17 00:00:00 2001 From: Cyborger1 <45152844+Cyborger1@users.noreply.github.com> Date: Fri, 15 Jan 2021 02:22:43 -0500 Subject: [PATCH 6/9] clues: Update Yanille anvil map clue description (#12825) --- .../net/runelite/client/plugins/cluescrolls/clues/MapClue.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/MapClue.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/MapClue.java index 2800580294..fa32e1533b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/MapClue.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/MapClue.java @@ -79,7 +79,7 @@ public class MapClue extends ClueScroll implements ObjectClueScroll new MapClue(CLUE_SCROLL_MEDIUM_7294, new WorldPoint(2666, 3562, 0), "Between Seers' Village and Rellekka. South-west of Fairy ring CJR"), new MapClue(CLUE_SCROLL_HARD, new WorldPoint(3309, 3503, 0), CRATE_2620, "A crate in the Lumber Yard, north-east of Varrock."), new MapClue(CLUE_SCROLL_HARD_2729, new WorldPoint(3190, 3963, 0), "Behind the Magic axe hut in level 56 Wilderness."), - new MapClue(CLUE_SCROLL_HARD_3520, new WorldPoint(2615, 3078, 0), "Yanille anvils, south of the bank."), + new MapClue(CLUE_SCROLL_HARD_3520, new WorldPoint(2615, 3078, 0), "Yanille anvils, south of the bank. You can dig from inside the building."), new MapClue(CLUE_SCROLL_HARD_3522, new WorldPoint(2488, 3308, 0), "In the western section of West Ardougne."), new MapClue(CLUE_SCROLL_HARD_3524, new WorldPoint(2457, 3182, 0), CRATE_18506, "In a crate by the stairs to the Observatory Dungeon."), new MapClue(CLUE_SCROLL_HARD_3525, new WorldPoint(3026, 3628, 0), CRATE_354, "In a crate at the Dark Warriors' Fortress in level 14 Wilderness."), From 4b87a08610e8276eb9ff7535228842ee8748b790 Mon Sep 17 00:00:00 2001 From: Usman Akhtar <60450353+akhtar-u@users.noreply.github.com> Date: Fri, 15 Jan 2021 04:10:49 -0500 Subject: [PATCH 7/9] worldmap: Fix copper ore amount at battlefield mine (#12802) --- .../runelite/client/plugins/worldmap/MiningSiteLocation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/MiningSiteLocation.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/MiningSiteLocation.java index b01f709250..bd647d2b1d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/MiningSiteLocation.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/MiningSiteLocation.java @@ -55,7 +55,7 @@ enum MiningSiteLocation BANDIT_CAMP_MINE(new WorldPoint(3086, 3763, 0), new Rock(16, Ore.IRON), new Rock(20, Ore.COAL), new Rock(22, Ore.MITHRIL), new Rock(8, Ore.ADAMANTITE)), BANDIT_CAMP_QUARRY(new WorldPoint(3171, 2912, 0), new Rock(4, Ore.CLAY), new Rock(2, Ore.COAL), new Rock(32, Ore.SANDSTONE), new Rock(28, Ore.GRANITE)), BARBARIAN_VILLAGE(new WorldPoint(3078, 3421, 0), new Rock(5, Ore.TIN), new Rock(4, Ore.COAL)), - BATTLEFIELD(new WorldPoint(2471, 3255, 0), new Rock(2, Ore.COPPER), new Rock(1, Ore.TIN)), + BATTLEFIELD(new WorldPoint(2471, 3255, 0), new Rock(3, Ore.COPPER), new Rock(1, Ore.TIN)), BLAST_MINE_EAST(new WorldPoint(1502, 3869, 0), new Rock(20, Ore.HARD_ROCK)), BLAST_MINE_NORTH(new WorldPoint(1485, 3882, 0), new Rock(17, Ore.HARD_ROCK)), BLAST_MINE_WEST(new WorldPoint(1471, 3865, 0), new Rock(22, Ore.HARD_ROCK)), From 6c50e7cb372a8a93857658a86f04b4a86d9cab86 Mon Sep 17 00:00:00 2001 From: Morgan Lewis Date: Fri, 15 Jan 2021 11:57:37 -0700 Subject: [PATCH 8/9] Fix growth stages of sweetcorn and watermelon --- .../runelite/client/plugins/timetracking/farming/Produce.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/Produce.java b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/Produce.java index 033b358ad6..bfb5a1abe3 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/Produce.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/Produce.java @@ -43,9 +43,9 @@ public enum Produce ONION("Onion", "Onions", PatchImplementation.ALLOTMENT, ItemID.ONION, 10, 5, 0, 3), CABBAGE("Cabbage", "Cabbages", PatchImplementation.ALLOTMENT, ItemID.CABBAGE, 10, 5, 0, 3), TOMATO("Tomato", "Tomatoes", PatchImplementation.ALLOTMENT, ItemID.TOMATO, 10, 5, 0, 3), - SWEETCORN("Sweetcorn", PatchImplementation.ALLOTMENT, ItemID.SWEETCORN, 10, 6, 0, 3), + SWEETCORN("Sweetcorn", PatchImplementation.ALLOTMENT, ItemID.SWEETCORN, 10, 7, 0, 3), STRAWBERRY("Strawberry", "Strawberries", PatchImplementation.ALLOTMENT, ItemID.STRAWBERRY, 10, 7, 0, 3), - WATERMELON("Watermelon", "Watermelons", PatchImplementation.ALLOTMENT, ItemID.WATERMELON, 10, 8, 0, 3), + WATERMELON("Watermelon", "Watermelons", PatchImplementation.ALLOTMENT, ItemID.WATERMELON, 10, 9, 0, 3), SNAPE_GRASS("Snape grass", PatchImplementation.ALLOTMENT, ItemID.SNAPE_GRASS, 10, 8, 0, 3), // Flower crops From c997e175a556129b09d8204a481925d62dfa697b Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 15 Jan 2021 12:08:24 -0500 Subject: [PATCH 9/9] world map: consolidate world map points into one --- .../worldmap/AgilityShortcutPoint.java | 43 ---- .../client/plugins/worldmap/DungeonPoint.java | 38 ---- .../plugins/worldmap/FairyRingPoint.java | 42 ---- .../plugins/worldmap/FarmingPatchPoint.java | 39 ---- .../plugins/worldmap/FishingSpotPoint.java | 39 ---- .../plugins/worldmap/HunterAreaPoint.java | 38 ---- .../plugins/worldmap/KourendTaskPoint.java | 37 ---- ...{AgilityCoursePoint.java => MapPoint.java} | 34 ++- .../plugins/worldmap/MinigamePoint.java | 38 ---- .../plugins/worldmap/MiningSitePoint.java | 38 ---- .../plugins/worldmap/QuestStartPoint.java | 39 ---- .../plugins/worldmap/RareTreePoint.java | 44 ---- .../worldmap/RunecraftingAltarPoint.java | 39 ---- .../plugins/worldmap/TeleportPoint.java | 39 ---- .../plugins/worldmap/TransportationPoint.java | 47 ---- .../plugins/worldmap/WorldMapPlugin.java | 203 +++++++++++++----- .../ui/overlay/worldmap/WorldMapPoint.java | 4 +- 17 files changed, 175 insertions(+), 626 deletions(-) delete mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/worldmap/AgilityShortcutPoint.java delete mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/worldmap/DungeonPoint.java delete mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/worldmap/FairyRingPoint.java delete mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/worldmap/FarmingPatchPoint.java delete mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/worldmap/FishingSpotPoint.java delete mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/worldmap/HunterAreaPoint.java delete mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/worldmap/KourendTaskPoint.java rename runelite-client/src/main/java/net/runelite/client/plugins/worldmap/{AgilityCoursePoint.java => MapPoint.java} (77%) delete mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/worldmap/MinigamePoint.java delete mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/worldmap/MiningSitePoint.java delete mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/worldmap/QuestStartPoint.java delete mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/worldmap/RareTreePoint.java delete mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/worldmap/RunecraftingAltarPoint.java delete mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/worldmap/TeleportPoint.java delete mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/worldmap/TransportationPoint.java diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/AgilityShortcutPoint.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/AgilityShortcutPoint.java deleted file mode 100644 index c99979f103..0000000000 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/AgilityShortcutPoint.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2018, Morgan Lewis - * 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; -import net.runelite.client.game.AgilityShortcut; - -class AgilityShortcutPoint extends WorldMapPoint -{ - AgilityShortcutPoint(AgilityShortcut data, BufferedImage icon, boolean showTooltip) - { - super(data.getWorldMapLocation(), icon); - - if (showTooltip) - { - setTooltip(data.getTooltip()); - } - } -} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/DungeonPoint.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/DungeonPoint.java deleted file mode 100644 index 9d50ec322f..0000000000 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/DungeonPoint.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2020, Arman S - * 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 DungeonPoint extends WorldMapPoint -{ - DungeonPoint(DungeonLocation data, BufferedImage icon) - { - super(data.getLocation(), icon); - setTooltip(data.getTooltip()); - } -} \ No newline at end of file diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/FairyRingPoint.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/FairyRingPoint.java deleted file mode 100644 index ef4e55da92..0000000000 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/FairyRingPoint.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2018, Morgan Lewis - * 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 FairyRingPoint extends WorldMapPoint -{ - FairyRingPoint(FairyRingLocation data, BufferedImage icon, boolean showTooltip) - { - super(data.getLocation(), icon); - - if (showTooltip) - { - setTooltip("Fairy Ring - " + data.getCode()); - } - } -} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/FarmingPatchPoint.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/FarmingPatchPoint.java deleted file mode 100644 index 79b380c220..0000000000 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/FarmingPatchPoint.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2018, Torkel Velure - * 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.api.coords.WorldPoint; -import net.runelite.client.ui.overlay.worldmap.WorldMapPoint; - -class FarmingPatchPoint extends WorldMapPoint -{ - FarmingPatchPoint(WorldPoint point, String tooltip, BufferedImage icon) - { - super(point, icon); - setTooltip(tooltip); - } -} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/FishingSpotPoint.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/FishingSpotPoint.java deleted file mode 100644 index fa32c86ffe..0000000000 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/FishingSpotPoint.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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.api.coords.WorldPoint; -import net.runelite.client.ui.overlay.worldmap.WorldMapPoint; - -class FishingSpotPoint extends WorldMapPoint -{ - FishingSpotPoint(WorldPoint point, String tooltip, BufferedImage icon) - { - super(point, icon); - setTooltip(tooltip); - } -} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/HunterAreaPoint.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/HunterAreaPoint.java deleted file mode 100644 index 2725f3de11..0000000000 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/HunterAreaPoint.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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 HunterAreaPoint extends WorldMapPoint -{ - HunterAreaPoint(HunterAreaLocation data, BufferedImage icon) - { - super(data.getLocation(), icon); - setTooltip(data.getTooltip()); - } -} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/KourendTaskPoint.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/KourendTaskPoint.java deleted file mode 100644 index 21170e0789..0000000000 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/KourendTaskPoint.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2020, Brooklyn - * 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 net.runelite.client.ui.overlay.worldmap.WorldMapPoint; - -public class KourendTaskPoint extends WorldMapPoint -{ - KourendTaskPoint(KourendTaskLocation data) - { - super(data.getLocation(), WorldMapPlugin.BLANK_ICON); - setTooltip(data.getTooltip()); - } -} 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/MapPoint.java similarity index 77% rename from runelite-client/src/main/java/net/runelite/client/plugins/worldmap/AgilityCoursePoint.java rename to runelite-client/src/main/java/net/runelite/client/plugins/worldmap/MapPoint.java index 982f8db975..161c669604 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/AgilityCoursePoint.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/MapPoint.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, melky + * Copyright (c) 2021, Adam * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,18 +25,32 @@ */ package net.runelite.client.plugins.worldmap; -import java.awt.image.BufferedImage; +import lombok.Getter; +import lombok.experimental.SuperBuilder; import net.runelite.client.ui.overlay.worldmap.WorldMapPoint; -class AgilityCoursePoint extends WorldMapPoint +@SuperBuilder +class MapPoint extends WorldMapPoint { - AgilityCoursePoint(AgilityCourseLocation data, BufferedImage icon, boolean showTooltip) + enum Type { - super(data.getLocation(), icon); - - if (showTooltip) - { - setTooltip(data.getTooltip()); - } + TELEPORT, + RUNECRAFT_ALTAR, + MINING_SITE, + DUNGEON, + HUNTER, + FISHING, + KOUREND_TASK, + FARMING_PATCH, + TRANSPORTATION, + MINIGAME, + FAIRY_RING, + AGILITY_COURSE, + AGILITY_SHORTCUT, + QUEST, + RARE_TREE } + + @Getter + private final Type type; } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/MinigamePoint.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/MinigamePoint.java deleted file mode 100644 index bd670aa023..0000000000 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/MinigamePoint.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2018, Magic fTail - * 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 MinigamePoint extends WorldMapPoint -{ - MinigamePoint(MinigameLocation data, BufferedImage icon) - { - super(data.getLocation(), icon); - setTooltip(data.getTooltip()); - } -} \ No newline at end of file diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/MiningSitePoint.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/MiningSitePoint.java deleted file mode 100644 index 3a09a1b298..0000000000 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/MiningSitePoint.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2020, dekvall - * 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 MiningSitePoint extends WorldMapPoint -{ - MiningSitePoint(MiningSiteLocation point, BufferedImage icon) - { - super(point.getLocation(), icon); - setTooltip(point.getTooltip()); - } -} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/QuestStartPoint.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/QuestStartPoint.java deleted file mode 100644 index 681015b98e..0000000000 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/QuestStartPoint.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2018, John James Hamilton - * 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 net.runelite.api.coords.WorldPoint; -import net.runelite.client.ui.overlay.worldmap.WorldMapPoint; -import java.awt.image.BufferedImage; - -class QuestStartPoint extends WorldMapPoint -{ - QuestStartPoint(WorldPoint location, BufferedImage icon, String tooltip) - { - super(location, icon); - setTooltip(tooltip); - } -} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/RareTreePoint.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/RareTreePoint.java deleted file mode 100644 index 0dd42013bd..0000000000 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/RareTreePoint.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2018, Spedwards - * 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 net.runelite.api.coords.WorldPoint; -import net.runelite.client.ui.overlay.worldmap.WorldMapPoint; - -import java.awt.image.BufferedImage; - -class RareTreePoint extends WorldMapPoint -{ - RareTreePoint(WorldPoint point, String tooltip, BufferedImage icon, boolean showTooltip) - { - super(point, icon); - - if (showTooltip) - { - setTooltip(tooltip); - } - } -} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/RunecraftingAltarPoint.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/RunecraftingAltarPoint.java deleted file mode 100644 index d09ced3ce9..0000000000 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/RunecraftingAltarPoint.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2019, Dava96 - * 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 net.runelite.client.ui.overlay.worldmap.WorldMapPoint; -import net.runelite.client.util.ImageUtil; - -class RunecraftingAltarPoint extends WorldMapPoint -{ - RunecraftingAltarPoint(RunecraftingAltarLocation point) - { - super(point.getLocation(), WorldMapPlugin.BLANK_ICON); - setImage(ImageUtil.loadImageResource(WorldMapPlugin.class, point.getIconPath())); - setTooltip(point.getTooltip()); - } -} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/TeleportPoint.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/TeleportPoint.java deleted file mode 100644 index a1171cfbc6..0000000000 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/TeleportPoint.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2018, Morgan Lewis - * 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 net.runelite.client.ui.overlay.worldmap.WorldMapPoint; -import net.runelite.client.util.ImageUtil; - -class TeleportPoint extends WorldMapPoint -{ - TeleportPoint(TeleportLocationData data) - { - super(data.getLocation(), WorldMapPlugin.BLANK_ICON); - setTooltip(data.getTooltip()); - setImage(ImageUtil.loadImageResource(WorldMapPlugin.class, data.getIconPath())); - } -} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/TransportationPoint.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/TransportationPoint.java deleted file mode 100644 index 2996794212..0000000000 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/TransportationPoint.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2019, Kyle Sergio - * Copyright (c) 2019, Bryce Altomare - * Copyright (c) 2019, Kyle Stead - * 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 net.runelite.api.coords.WorldPoint; -import net.runelite.client.ui.overlay.worldmap.WorldMapPoint; -import java.awt.image.BufferedImage; - -class TransportationPoint extends WorldMapPoint -{ - TransportationPoint(TransportationPointLocation data, BufferedImage icon) - { - super(data.getLocation(), icon); - final WorldPoint target = data.getTarget(); - if (target != null) - { - setTarget(target); - setJumpOnClick(true); - } - setTooltip(data.getTooltip()); - } -} 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 518edd0668..1114d56720 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 @@ -29,21 +29,23 @@ import com.google.inject.Inject; import com.google.inject.Provides; import java.awt.image.BufferedImage; import java.util.Arrays; +import java.util.function.Predicate; import net.runelite.api.Client; import net.runelite.api.GameState; import net.runelite.api.Quest; import net.runelite.api.QuestState; import net.runelite.api.Skill; -import net.runelite.client.events.ConfigChanged; import net.runelite.api.events.StatChanged; import net.runelite.api.events.WidgetLoaded; import net.runelite.api.widgets.WidgetID; import net.runelite.client.callback.ClientThread; import net.runelite.client.config.ConfigManager; import net.runelite.client.eventbus.Subscribe; +import net.runelite.client.events.ConfigChanged; import net.runelite.client.game.AgilityShortcut; import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.PluginDescriptor; +import net.runelite.client.ui.overlay.worldmap.WorldMapPoint; import net.runelite.client.ui.overlay.worldmap.WorldMapPointManager; import net.runelite.client.util.ImageUtil; @@ -161,18 +163,7 @@ public class WorldMapPlugin extends Plugin @Override protected void shutDown() throws Exception { - worldMapPointManager.removeIf(FairyRingPoint.class::isInstance); - worldMapPointManager.removeIf(AgilityShortcutPoint.class::isInstance); - worldMapPointManager.removeIf(QuestStartPoint.class::isInstance); - worldMapPointManager.removeIf(TeleportPoint.class::isInstance); - worldMapPointManager.removeIf(TransportationPoint.class::isInstance); - worldMapPointManager.removeIf(MinigamePoint.class::isInstance); - worldMapPointManager.removeIf(FarmingPatchPoint.class::isInstance); - worldMapPointManager.removeIf(RareTreePoint.class::isInstance); - worldMapPointManager.removeIf(RunecraftingAltarPoint.class::isInstance); - worldMapPointManager.removeIf(DungeonPoint.class::isInstance); - worldMapPointManager.removeIf(FishingSpotPoint.class::isInstance); - worldMapPointManager.removeIf(AgilityCoursePoint.class::isInstance); + worldMapPointManager.removeIf(MapPoint.class::isInstance); agilityLevel = 0; woodcuttingLevel = 0; } @@ -229,47 +220,61 @@ public class WorldMapPlugin extends Plugin private void updateAgilityIcons() { - worldMapPointManager.removeIf(AgilityShortcutPoint.class::isInstance); + worldMapPointManager.removeIf(isType(MapPoint.Type.AGILITY_SHORTCUT)); if (config.agilityShortcutLevelIcon() || config.agilityShortcutTooltips()) { Arrays.stream(AgilityShortcut.values()) .filter(value -> value.getWorldMapLocation() != null) - .map(value -> new AgilityShortcutPoint(value, - agilityLevel > 0 && config.agilityShortcutLevelIcon() && value.getLevel() > agilityLevel ? NOPE_ICON : BLANK_ICON, - config.agilityShortcutTooltips())) + .map(l -> + MapPoint.builder() + .type(MapPoint.Type.AGILITY_SHORTCUT) + .worldPoint(l.getWorldMapLocation()) + .image(agilityLevel > 0 && config.agilityShortcutLevelIcon() && l.getLevel() > agilityLevel ? NOPE_ICON : BLANK_ICON) + .tooltip(config.agilityShortcutTooltips() ? l.getTooltip() : null) + .build() + ) .forEach(worldMapPointManager::add); } } private void updateAgilityCourseIcons() { - worldMapPointManager.removeIf(AgilityCoursePoint.class::isInstance); + worldMapPointManager.removeIf(isType(MapPoint.Type.AGILITY_COURSE)); if (config.agilityCourseTooltip() || config.agilityCourseRooftop()) { Arrays.stream(AgilityCourseLocation.values()) .filter(value -> value.getLocation() != null) - .map(value -> new AgilityCoursePoint(value, - config.agilityCourseRooftop() && value.isRooftopCourse() ? ROOFTOP_COURSE_ICON : BLANK_ICON, - config.agilityCourseTooltip())) + .map(l -> + MapPoint.builder() + .type(MapPoint.Type.AGILITY_COURSE) + .worldPoint(l.getLocation()) + .image(config.agilityCourseRooftop() && l.isRooftopCourse() ? ROOFTOP_COURSE_ICON : BLANK_ICON) + .tooltip(config.agilityCourseTooltip() ? l.getTooltip() : null) + .build() + ) .forEach(worldMapPointManager::add); } } private void updateRareTreeIcons() { - worldMapPointManager.removeIf(RareTreePoint.class::isInstance); + worldMapPointManager.removeIf(isType(MapPoint.Type.RARE_TREE)); if (config.rareTreeLevelIcon() || config.rareTreeTooltips()) { Arrays.stream(RareTreeLocation.values()).forEach(rareTree -> Arrays.stream(rareTree.getLocations()) - .map(point -> new RareTreePoint(point, - rareTree.getTooltip(), - woodcuttingLevel > 0 && config.rareTreeLevelIcon() && - rareTree.getLevelReq() > woodcuttingLevel ? NOPE_ICON : BLANK_ICON, - config.rareTreeTooltips())) + .map(point -> + MapPoint.builder() + .type(MapPoint.Type.RARE_TREE) + .worldPoint(point) + .image(woodcuttingLevel > 0 && config.rareTreeLevelIcon() && + rareTree.getLevelReq() > woodcuttingLevel ? NOPE_ICON : BLANK_ICON) + .tooltip(config.rareTreeTooltips() ? rareTree.getTooltip() : null) + .build() + ) .forEach(worldMapPointManager::add)); } } @@ -281,43 +286,71 @@ public class WorldMapPlugin extends Plugin updateRareTreeIcons(); updateQuestStartPointIcons(); - worldMapPointManager.removeIf(FairyRingPoint.class::isInstance); + worldMapPointManager.removeIf(isType(MapPoint.Type.FAIRY_RING)); if (config.fairyRingIcon() || config.fairyRingTooltips()) { Arrays.stream(FairyRingLocation.values()) - .map(value -> new FairyRingPoint(value, - config.fairyRingIcon() ? FAIRY_TRAVEL_ICON : BLANK_ICON, - config.fairyRingTooltips())) + .map(l -> + MapPoint.builder() + .type(MapPoint.Type.FAIRY_RING) + .worldPoint(l.getLocation()) + .image(config.fairyRingIcon() ? FAIRY_TRAVEL_ICON : BLANK_ICON) + .tooltip(config.fairyRingTooltips() ? "Fairy Ring - " + l.getCode() : null) + .build() + ) .forEach(worldMapPointManager::add); } - worldMapPointManager.removeIf(MinigamePoint.class::isInstance); + worldMapPointManager.removeIf(isType(MapPoint.Type.MINIGAME)); if (config.minigameTooltip()) { Arrays.stream(MinigameLocation.values()) - .map(value -> new MinigamePoint(value, BLANK_ICON)) + .map(l -> + MapPoint.builder() + .type(MapPoint.Type.MINIGAME) + .worldPoint(l.getLocation()) + .image(BLANK_ICON) + .tooltip(l.getTooltip()) + .build() + ) .forEach(worldMapPointManager::add); } - worldMapPointManager.removeIf(TransportationPoint.class::isInstance); + worldMapPointManager.removeIf(isType(MapPoint.Type.TRANSPORTATION)); if (config.transportationTeleportTooltips()) { Arrays.stream(TransportationPointLocation.values()) - .map(value -> new TransportationPoint(value, BLANK_ICON)) - .forEach((worldMapPointManager::add)); + .map(l -> + MapPoint.builder() + .type(MapPoint.Type.TRANSPORTATION) + .worldPoint(l.getLocation()) + .image(BLANK_ICON) + .target(l.getTarget()) + .jumpOnClick(l.getTarget() != null) + .tooltip(l.getTooltip()) + .build() + ) + .forEach((worldMapPointManager::add)); } - worldMapPointManager.removeIf(FarmingPatchPoint.class::isInstance); + worldMapPointManager.removeIf(isType(MapPoint.Type.FARMING_PATCH)); if (config.farmingPatchTooltips()) { Arrays.stream(FarmingPatchLocation.values()).forEach(location -> Arrays.stream(location.getLocations()) - .map(point -> new FarmingPatchPoint(point, location.getTooltip(), BLANK_ICON)) + .map(point -> + MapPoint.builder() + .type(MapPoint.Type.FARMING_PATCH) + .worldPoint(point) + .image(BLANK_ICON) + .tooltip(location.getTooltip()) + .build() + ) .forEach(worldMapPointManager::add) ); } - worldMapPointManager.removeIf(TeleportPoint.class::isInstance); + worldMapPointManager.removeIf(isType(MapPoint.Type.TELEPORT)); Arrays.stream(TeleportLocationData.values()) .filter(data -> { @@ -340,63 +373,113 @@ public class WorldMapPlugin extends Plugin default: return false; } - }).map(TeleportPoint::new) + }) + .map(l -> + MapPoint.builder() + .type(MapPoint.Type.TELEPORT) + .worldPoint(l.getLocation()) + .tooltip(l.getTooltip()) + .image(ImageUtil.loadImageResource(WorldMapPlugin.class, l.getIconPath())) + .build() + ) .forEach(worldMapPointManager::add); - worldMapPointManager.removeIf(RunecraftingAltarPoint.class::isInstance); + worldMapPointManager.removeIf(isType(MapPoint.Type.RUNECRAFT_ALTAR)); if (config.runecraftingAltarIcon()) { Arrays.stream(RunecraftingAltarLocation.values()) - .map(RunecraftingAltarPoint::new) + .map(l -> + MapPoint.builder() + .type(MapPoint.Type.RUNECRAFT_ALTAR) + .worldPoint(l.getLocation()) + .image(ImageUtil.loadImageResource(WorldMapPlugin.class, l.getIconPath())) + .tooltip(l.getTooltip()) + .build() + ) .forEach(worldMapPointManager::add); } - worldMapPointManager.removeIf(MiningSitePoint.class::isInstance); + worldMapPointManager.removeIf(isType(MapPoint.Type.MINING_SITE)); if (config.miningSiteTooltips()) { Arrays.stream(MiningSiteLocation.values()) - .map(value -> new MiningSitePoint(value, value.isIconRequired() ? MINING_SITE_ICON : BLANK_ICON)) + .map(l -> + MapPoint.builder() + .type(MapPoint.Type.MINING_SITE) + .worldPoint(l.getLocation()) + .image(l.isIconRequired() ? MINING_SITE_ICON : BLANK_ICON) + .tooltip(l.getTooltip()) + .build() + ) .forEach(worldMapPointManager::add); } - worldMapPointManager.removeIf(DungeonPoint.class::isInstance); + worldMapPointManager.removeIf(isType(MapPoint.Type.DUNGEON)); if (config.dungeonTooltips()) { Arrays.stream(DungeonLocation.values()) - .map(value -> new DungeonPoint(value, BLANK_ICON)) + .map(l -> + MapPoint.builder() + .type(MapPoint.Type.DUNGEON) + .worldPoint(l.getLocation()) + .image(BLANK_ICON) + .tooltip(l.getTooltip()) + .build() + ) .forEach(worldMapPointManager::add); } - worldMapPointManager.removeIf(HunterAreaPoint.class::isInstance); + worldMapPointManager.removeIf(isType(MapPoint.Type.HUNTER)); if (config.hunterAreaTooltips()) { Arrays.stream(HunterAreaLocation.values()) - .map(value -> new HunterAreaPoint(value, BLANK_ICON)) + .map(l -> + MapPoint.builder() + .type(MapPoint.Type.HUNTER) + .worldPoint(l.getLocation()) + .image(BLANK_ICON) + .tooltip(l.getTooltip()) + .build() + ) .forEach(worldMapPointManager::add); } - worldMapPointManager.removeIf(FishingSpotPoint.class::isInstance); + worldMapPointManager.removeIf(isType(MapPoint.Type.FISHING)); if (config.fishingSpotTooltips()) { Arrays.stream(FishingSpotLocation.values()).forEach(location -> Arrays.stream(location.getLocations()) - .map(point -> new FishingSpotPoint(point, location.getTooltip(), BLANK_ICON)) + .map(point -> + MapPoint.builder() + .type(MapPoint.Type.FISHING) + .worldPoint(point) + .image(BLANK_ICON) + .tooltip(location.getTooltip()) + .build() + ) .forEach(worldMapPointManager::add) ); } - worldMapPointManager.removeIf(KourendTaskPoint.class::isInstance); + worldMapPointManager.removeIf(isType(MapPoint.Type.KOUREND_TASK)); if (config.kourendTaskTooltips()) { Arrays.stream(KourendTaskLocation.values()) - .map(KourendTaskPoint::new) + .map(l -> + MapPoint.builder() + .type(MapPoint.Type.KOUREND_TASK) + .worldPoint(l.getLocation()) + .image(BLANK_ICON) + .tooltip(l.getTooltip()) + .build() + ) .forEach(worldMapPointManager::add); } } private void updateQuestStartPointIcons() { - worldMapPointManager.removeIf(QuestStartPoint.class::isInstance); + worldMapPointManager.removeIf(isType(MapPoint.Type.QUEST)); if (!config.questStartTooltips()) { @@ -418,7 +501,7 @@ public class WorldMapPlugin extends Plugin }); } - private QuestStartPoint createQuestStartPoint(QuestStartLocation data) + private MapPoint createQuestStartPoint(QuestStartLocation data) { Quest[] quests = data.getQuests(); @@ -459,6 +542,16 @@ public class WorldMapPlugin extends Plugin } } - return new QuestStartPoint(data.getLocation(), icon, tooltip); + return MapPoint.builder() + .type(MapPoint.Type.QUEST) + .worldPoint(data.getLocation()) + .image(icon) + .tooltip(tooltip) + .build(); + } + + private static Predicate isType(MapPoint.Type type) + { + return w -> w instanceof MapPoint && ((MapPoint) w).getType() == type; } } diff --git a/runelite-client/src/main/java/net/runelite/client/ui/overlay/worldmap/WorldMapPoint.java b/runelite-client/src/main/java/net/runelite/client/ui/overlay/worldmap/WorldMapPoint.java index 878b0125a0..836bcd1ef5 100644 --- a/runelite-client/src/main/java/net/runelite/client/ui/overlay/worldmap/WorldMapPoint.java +++ b/runelite-client/src/main/java/net/runelite/client/ui/overlay/worldmap/WorldMapPoint.java @@ -27,12 +27,14 @@ package net.runelite.client.ui.overlay.worldmap; import java.awt.Rectangle; import java.awt.event.MouseEvent; import java.awt.image.BufferedImage; +import javax.annotation.Nullable; import lombok.Data; +import lombok.experimental.SuperBuilder; import net.runelite.api.Point; import net.runelite.api.coords.WorldPoint; -import javax.annotation.Nullable; @Data +@SuperBuilder public class WorldMapPoint { private BufferedImage image;