world map plugin: add misc teleports

This commit is contained in:
Adam
2018-05-27 14:54:19 -04:00
parent 412482951f
commit dbef04bd6f
12 changed files with 79 additions and 3 deletions

View File

@@ -109,7 +109,23 @@ enum TeleportLocationData
DESERT_EAGLE_STATION(TeleportType.JEWELLERY, "Necklace of Passage" , "Desert eagle station of the eagle transport system", new WorldPoint(3406, 3157, 0), "necklace_of_passage_teleport_icon.png"),
CHAOS_TEMPLE(TeleportType.JEWELLERY, "Burning Amulet" , "Chaos Temple (lvl 15)", new WorldPoint(3234, 3637, 0), "burning_amulet_teleport_icon.png"),
BANDIT_CAMP(TeleportType.JEWELLERY, "Burning Amulet" , "Bandit Camp (lvl 17)", new WorldPoint(3038, 3651, 0), "burning_amulet_teleport_icon.png"),
LAVA_MAZE(TeleportType.JEWELLERY, "Burning Amulet" , "Lava Maze (lvl 41)", new WorldPoint(3028, 3840, 0), "burning_amulet_teleport_icon.png");
LAVA_MAZE(TeleportType.JEWELLERY, "Burning Amulet" , "Lava Maze (lvl 41)", new WorldPoint(3028, 3840, 0), "burning_amulet_teleport_icon.png"),
// Misc
XERICS_LOOKOUT(TeleportType.OTHER, "Xeric's Talisman", "Xeric's Lookout", new WorldPoint(1576, 3528, 0), "xerics_talisman_teleport_icon.png"),
XERICS_GLADE(TeleportType.OTHER, "Xeric's Talisman", "Xeric's Glade", new WorldPoint(1773, 3502, 0), "xerics_talisman_teleport_icon.png"),
XERICS_INFERNO(TeleportType.OTHER, "Xeric's Talisman", "Xeric's Inferno", new WorldPoint(1504, 3819, 0), "xerics_talisman_teleport_icon.png"),
XERICS_HEART(TeleportType.OTHER, "Xeric's Talisman", "Xeric's Heart", new WorldPoint(1641, 3670, 0), "xerics_talisman_teleport_icon.png"),
XERICS_HONOUR(TeleportType.OTHER, "Xeric's Talisman", "Xeric's Honour", new WorldPoint(1254, 3559, 0), "xerics_talisman_teleport_icon.png"),
STRONGHOLD_OF_SECURITY(TeleportType.OTHER, "Skull Sceptre", "Stronghold of Security", new WorldPoint(3081, 3421, 0), "skull_sceptre_teleport_icon.png"),
MYTHS_GUILD(TeleportType.OTHER, "Mythical Cape", "Myth's Guild", new WorldPoint(2458, 2851, 0), "mythical_cape_teleport_icon.png"),
ECTOFUNTUS(TeleportType.OTHER, "Ectophial", "Ectofuntus", new WorldPoint(3660, 3522, 0), "ectophial_teleport_icon.png"),
CHAMPIONS_GUILD_CHRONICLE(TeleportType.OTHER, "Chronicle", "Champion's Guild", new WorldPoint(3202, 3357, 0), "chronicle_teleport_icon.png"),
GRAND_TREE(TeleportType.OTHER, "Royal Seed Pod", "Grand Tree", new WorldPoint(2465, 3495, 0), "royal_seed_pod_teleport_icon.png"),
RELLEKKKA_LYRE(TeleportType.OTHER, "Enchanted Lyre", "Rellekka", new WorldPoint(2664, 3643, 0), "enchanted_lyre_teleport_icon.png"),
WATERBIRTH_ISLAND_LYRE(TeleportType.OTHER, "Enchanted Lyre", "Waterbirth Island", new WorldPoint(2550, 3756, 0), "enchanted_lyre_teleport_icon.png"),
NEITIZNOT_LYRE(TeleportType.OTHER, "Enchanted Lyre", "Neitiznot", new WorldPoint(2336, 3801, 0), "enchanted_lyre_teleport_icon.png"),
JATIZSO_LYRE(TeleportType.OTHER, "Enchanted Lyre", "Jatizso", new WorldPoint(2409, 3809, 0), "enchanted_lyre_teleport_icon.png");
private final TeleportType type;
private final String tooltip;

View File

@@ -34,7 +34,8 @@ public enum TeleportType
ANCIENT_MAGICKS("Ancient - "),
LUNAR_MAGIC("Lunar - "),
ARCEUUS_MAGIC("Arceuus - "),
JEWELLERY("Jewellery - ");
JEWELLERY("Jewellery - "),
OTHER("");
private String prefix;

View File

@@ -134,4 +134,15 @@ public interface WorldMapConfig extends Config
{
return true;
}
@ConfigItem(
keyName = WorldMapPlugin.CONFIG_KEY_MISC_TELEPORT_ICON,
name = "Show misc teleport locations",
description = "Show icons at the destinations for miscellaneous teleport items",
position = 10
)
default boolean miscellaneousTeleportIcon()
{
return true;
}
}

View File

@@ -61,6 +61,7 @@ public class WorldMapPlugin extends Plugin
static final String CONFIG_KEY_LUNAR_TELEPORT_ICON = "lunarSpellbookIcon";
static final String CONFIG_KEY_ARCEUUS_TELEPORT_ICON = "arceuusSpellbookIcon";
static final String CONFIG_KEY_JEWELLERY_TELEPORT_ICON = "jewelleryIcon";
static final String CONFIG_KEY_MISC_TELEPORT_ICON = "miscellaneousTeleportIcon";
static
{
@@ -143,6 +144,7 @@ public class WorldMapPlugin extends Plugin
case CONFIG_KEY_LUNAR_TELEPORT_ICON:
case CONFIG_KEY_ARCEUUS_TELEPORT_ICON:
case CONFIG_KEY_JEWELLERY_TELEPORT_ICON:
case CONFIG_KEY_MISC_TELEPORT_ICON:
worldMapPointManager.removeIf(TeleportPoint.class::isInstance);
createMagicTeleportPoints();
break;
@@ -172,7 +174,8 @@ public class WorldMapPlugin extends Plugin
|| config.ancientTeleportIcon()
|| config.lunarTeleportIcon()
|| config.arceuusTeleportIcon()
|| config.jewelleryTeleportIcon())
|| config.jewelleryTeleportIcon()
|| config.miscellaneousTeleportIcon())
{
createMagicTeleportPoints();
}
@@ -221,6 +224,8 @@ public class WorldMapPlugin extends Plugin
return config.arceuusTeleportIcon();
case JEWELLERY:
return config.jewelleryTeleportIcon();
case OTHER:
return config.miscellaneousTeleportIcon();
default:
return false;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -0,0 +1,43 @@
/*
* Copyright (c) 2018, Adam <Adam@sigterm.info>
* 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 static org.junit.Assert.assertNotNull;
import org.junit.Test;
public class TeleportLocationDataTest
{
@Test
public void testResources()
{
for (TeleportLocationData data : TeleportLocationData.values())
{
String path = data.getIconPath();
assertNotNull(path);
assertNotNull(path, getClass().getResourceAsStream(path));
}
}
}