diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/RunecraftingAltarLocation.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/RunecraftingAltarLocation.java new file mode 100644 index 0000000000..c2f8319635 --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/RunecraftingAltarLocation.java @@ -0,0 +1,62 @@ +/* + * 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 lombok.Getter; +import net.runelite.api.coords.WorldPoint; + +@Getter +enum RunecraftingAltarLocation +{ + AIR_ALTAR("Air Altar", 1, new WorldPoint(2985, 3293, 0), "air_altar_icon.png"), + MIND_ALTAR("Mind Altar", 2, new WorldPoint(2982, 3514, 0), "mind_altar_icon.png"), + WATER_ALTAR("Water Altar", 5, new WorldPoint(3185, 3165, 0), "water_altar_icon.png"), + EARTH_ALTAR("Earth Altar", 9, new WorldPoint(3306, 3474, 0), "earth_altar_icon.png"), + FIRE_ALTAR("Fire Altar", 14, new WorldPoint(3313, 3255, 0), "fire_altar_icon.png"), + BODY_ALTAR("Body Altar", 20, new WorldPoint(3053, 3445, 0), "body_altar_icon.png"), + COSMIC_ALTAR("Cosmic Altar", 27, new WorldPoint(2408, 4377, 0), "cosmic_altar_icon.png"), + CHAOS_ALTAR("Chaos Altar", 35, new WorldPoint(3060, 3591, 0), "chaos_altar_icon.png"), + ASTRAL_ALTAR("Astral Altar", 40, new WorldPoint(2158, 3864, 0), "astral_altar_icon.png"), + NATURE_ALTAR("Nature Altar", 44, new WorldPoint(2869, 3019, 0), "nature_altar_icon.png"), + LAW_ALTAR("Law Altar", 54, new WorldPoint(2858, 3381, 0), "law_altar_icon.png"), + DEATH_ALTAR("Death Altar", 65, new WorldPoint(1860, 4639, 0), "death_altar_icon.png"), + BLOOD_ALTAR("Blood Altar", 77, new WorldPoint(1716, 3827, 0), "blood_altar_icon.png"), + SOUL_ALTAR("Soul Altar", 90, new WorldPoint(1814, 3856, 0), "soul_altar_icon.png"), + WRATH_ALTAR("Wrath Altar", 95, new WorldPoint(2446, 2825, 0), "wrath_altar_icon.png"); + + private final String tooltip; + private final WorldPoint location; + private final int levelReq; + private final String iconPath; + + RunecraftingAltarLocation(String description, int level, WorldPoint location, String iconPath) + { + this.tooltip = description + " - Level " + level; + this.location = location; + this.levelReq = level; + this.iconPath = iconPath; + } +} 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 new file mode 100644 index 0000000000..11cdad457f --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/RunecraftingAltarPoint.java @@ -0,0 +1,39 @@ +/* + * 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.getResourceStreamFromClass(WorldMapPlugin.class, point.getIconPath())); + setTooltip(point.getTooltip()); + } +} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapConfig.java index 7ebe417ef2..4070a77b1a 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapConfig.java @@ -218,4 +218,15 @@ public interface WorldMapConfig extends Config { return true; } + + @ConfigItem( + keyName = WorldMapPlugin.CONFIG_KEY_RUNECRAFTING_ALTAR_ICON, + name = "Show runecrafting altar locations", + description = "Show the icons of runecrafting altars", + position = 18 + ) + default boolean runecraftingAltarIcon() + { + return true; + } } \ No newline at end of file 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 32e34d013b..37ff9a5192 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 @@ -79,6 +79,7 @@ public class WorldMapPlugin extends Plugin static final String CONFIG_KEY_RARE_TREE_TOOLTIPS = "rareTreeTooltips"; static final String CONFIG_KEY_RARE_TREE_LEVEL_ICON = "rareTreeIcon"; static final String CONFIG_KEY_TRANSPORATION_TELEPORT_TOOLTIPS = "transportationTooltips"; + static final String CONFIG_KEY_RUNECRAFTING_ALTAR_ICON = "runecraftingAltarIcon"; static { @@ -151,6 +152,7 @@ public class WorldMapPlugin extends Plugin worldMapPointManager.removeIf(MinigamePoint.class::isInstance); worldMapPointManager.removeIf(FarmingPatchPoint.class::isInstance); worldMapPointManager.removeIf(RareTreePoint.class::isInstance); + worldMapPointManager.removeIf(RunecraftingAltarPoint.class::isInstance); agilityLevel = 0; woodcuttingLevel = 0; } @@ -304,6 +306,14 @@ public class WorldMapPlugin extends Plugin } }).map(TeleportPoint::new) .forEach(worldMapPointManager::add); + + worldMapPointManager.removeIf(RunecraftingAltarPoint.class::isInstance); + if (config.runecraftingAltarIcon()) + { + Arrays.stream(RunecraftingAltarLocation.values()) + .map(RunecraftingAltarPoint::new) + .forEach(worldMapPointManager::add); + } } private void updateQuestStartPointIcons() diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/air_altar_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/air_altar_icon.png new file mode 100644 index 0000000000..ae281d896c Binary files /dev/null and b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/air_altar_icon.png differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/astral_altar_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/astral_altar_icon.png new file mode 100644 index 0000000000..10b4aeccce Binary files /dev/null and b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/astral_altar_icon.png differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/blood_altar_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/blood_altar_icon.png new file mode 100644 index 0000000000..356557e538 Binary files /dev/null and b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/blood_altar_icon.png differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/body_altar_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/body_altar_icon.png new file mode 100644 index 0000000000..d9c51114d4 Binary files /dev/null and b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/body_altar_icon.png differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/chaos_altar_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/chaos_altar_icon.png new file mode 100644 index 0000000000..91b046d5d4 Binary files /dev/null and b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/chaos_altar_icon.png differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/cosmic_altar_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/cosmic_altar_icon.png new file mode 100644 index 0000000000..3a37733f10 Binary files /dev/null and b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/cosmic_altar_icon.png differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/death_altar_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/death_altar_icon.png new file mode 100644 index 0000000000..19c94eb0e2 Binary files /dev/null and b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/death_altar_icon.png differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/earth_altar_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/earth_altar_icon.png new file mode 100644 index 0000000000..828dffbd1f Binary files /dev/null and b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/earth_altar_icon.png differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/fire_altar_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/fire_altar_icon.png new file mode 100644 index 0000000000..f556a54ce9 Binary files /dev/null and b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/fire_altar_icon.png differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/law_altar_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/law_altar_icon.png new file mode 100644 index 0000000000..3a441635d4 Binary files /dev/null and b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/law_altar_icon.png differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/mind_altar_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/mind_altar_icon.png new file mode 100644 index 0000000000..b0aaeecf2a Binary files /dev/null and b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/mind_altar_icon.png differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/nature_altar_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/nature_altar_icon.png new file mode 100644 index 0000000000..ee53dbd5a3 Binary files /dev/null and b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/nature_altar_icon.png differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/soul_altar_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/soul_altar_icon.png new file mode 100644 index 0000000000..08615a949e Binary files /dev/null and b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/soul_altar_icon.png differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/water_altar_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/water_altar_icon.png new file mode 100644 index 0000000000..52200880ad Binary files /dev/null and b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/water_altar_icon.png differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/wrath_altar_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/wrath_altar_icon.png new file mode 100644 index 0000000000..87b77a7395 Binary files /dev/null and b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/wrath_altar_icon.png differ