world map: consolidate world map points into one
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
@@ -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()));
|
||||
}
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user