Merge remote-tracking branch 'upstream/master' into runelite

This commit is contained in:
TheRealNull
2021-01-15 23:41:00 -08:00
25 changed files with 187 additions and 633 deletions

View File

@@ -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),

View File

@@ -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."),

View File

@@ -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();
}

View File

@@ -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);

View File

@@ -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

View File

@@ -1,43 +0,0 @@
/*
* 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.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());
}
}
}

View File

@@ -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)),

View File

@@ -1,38 +0,0 @@
/*
* Copyright (c) 2020, Arman S <https://github.com/Rman887>
* 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());
}
}

View File

@@ -1,42 +0,0 @@
/*
* 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.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());
}
}
}

View File

@@ -1,39 +0,0 @@
/*
* Copyright (c) 2018, Torkel Velure <https://github.com/TorkelV>
* 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);
}
}

View File

@@ -1,39 +0,0 @@
/*
* Copyright (c) 2020, melky <https://github.com/melkypie>
* 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);
}
}

View File

@@ -1,38 +0,0 @@
/*
* Copyright (c) 2020, melky <https://github.com/melkypie>
* 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());
}
}

View File

@@ -1,37 +0,0 @@
/*
* Copyright (c) 2020, Brooklyn <https://github.com/Broooklyn>
* 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());
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, melky <https://github.com/melkypie>
* Copyright (c) 2021, Adam <Adam@sigterm.info>
* 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;
}

View File

@@ -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());
}
}

View File

@@ -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)),

View File

@@ -1,38 +0,0 @@
/*
* Copyright (c) 2020, dekvall <https://github.com/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());
}
}

View File

@@ -1,39 +0,0 @@
/*
* Copyright (c) 2018, John James Hamilton <https://github.com/johnhamilto>
* 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);
}
}

View File

@@ -1,44 +0,0 @@
/*
* Copyright (c) 2018, Spedwards <https://github.com/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);
}
}
}

View File

@@ -1,39 +0,0 @@
/*
* Copyright (c) 2019, Dava96 <https://github.com/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());
}
}

View File

@@ -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;

View File

@@ -1,39 +0,0 @@
/*
* 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 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()));
}
}

View File

@@ -1,47 +0,0 @@
/*
* Copyright (c) 2019, Kyle Sergio <https://github.com/ksergio39>
* Copyright (c) 2019, Bryce Altomare <https://github.com/Twinkiel0ver>
* Copyright (c) 2019, Kyle Stead <http://github.com/kyle1elyk>
* 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());
}
}

View File

@@ -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<WorldMapPoint> isType(MapPoint.Type type)
{
return w -> w instanceof MapPoint && ((MapPoint) w).getType() == type;
}
}

View File

@@ -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;