Merge pull request #2021 from BFGD/agility-shortcut-toggle
Add Agility shortcut highlight toggle
This commit is contained in:
@@ -91,4 +91,14 @@ public interface AgilityConfig extends Config
|
|||||||
return Color.ORANGE;
|
return Color.ORANGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "highlightShortcuts",
|
||||||
|
name = "Highlight Agility Shortcuts",
|
||||||
|
description = "Enable/disable the highlighting of Agility shortcuts",
|
||||||
|
position = 6
|
||||||
|
)
|
||||||
|
default boolean highlightShortcuts()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,6 +69,11 @@ public class AgilityOverlay extends Overlay
|
|||||||
final Tile markOfGrace = plugin.getMarkOfGrace();
|
final Tile markOfGrace = plugin.getMarkOfGrace();
|
||||||
plugin.getObstacles().forEach((object, tile) ->
|
plugin.getObstacles().forEach((object, tile) ->
|
||||||
{
|
{
|
||||||
|
if (Obstacles.SHORTCUT_OBSTACLE_IDS.contains(object.getId()) && !config.highlightShortcuts())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (tile.getPlane() == client.getPlane()
|
if (tile.getPlane() == client.getPlane()
|
||||||
&& object.getLocalLocation().distanceTo(playerLocation) < MAX_DISTANCE)
|
&& object.getLocalLocation().distanceTo(playerLocation) < MAX_DISTANCE)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -281,7 +281,13 @@ public class AgilityPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
obstacles.remove(oldObject);
|
obstacles.remove(oldObject);
|
||||||
|
|
||||||
if (newObject != null && Obstacles.OBSTACLE_IDS.contains(newObject.getId()))
|
if (newObject == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Obstacles.COURSE_OBSTACLE_IDS.contains(newObject.getId()) ||
|
||||||
|
Obstacles.SHORTCUT_OBSTACLE_IDS.contains(newObject.getId()))
|
||||||
{
|
{
|
||||||
obstacles.put(newObject, tile);
|
obstacles.put(newObject, tile);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import static net.runelite.api.ObjectID.*;
|
|||||||
|
|
||||||
public class Obstacles
|
public class Obstacles
|
||||||
{
|
{
|
||||||
public static final Set<Integer> OBSTACLE_IDS = Sets.newHashSet(
|
public static final Set<Integer> COURSE_OBSTACLE_IDS = Sets.newHashSet(
|
||||||
// Gnome
|
// Gnome
|
||||||
OBSTACLE_NET_23134, TREE_BRANCH_23559, TREE_BRANCH_23560, OBSTACLE_NET_23135, OBSTACLE_PIPE_23138,
|
OBSTACLE_NET_23134, TREE_BRANCH_23559, TREE_BRANCH_23560, OBSTACLE_NET_23135, OBSTACLE_PIPE_23138,
|
||||||
OBSTACLE_PIPE_23139, LOG_BALANCE_23145, BALANCING_ROPE_23557,
|
OBSTACLE_PIPE_23139, LOG_BALANCE_23145, BALANCING_ROPE_23557,
|
||||||
@@ -73,10 +73,10 @@ public class Obstacles
|
|||||||
// Rellaka
|
// Rellaka
|
||||||
ROUGH_WALL_11391, GAP_11392, TIGHTROPE_11393, GAP_11395, GAP_11396, TIGHTROPE_11397, PILE_OF_FISH,
|
ROUGH_WALL_11391, GAP_11392, TIGHTROPE_11393, GAP_11395, GAP_11396, TIGHTROPE_11397, PILE_OF_FISH,
|
||||||
// Ardougne
|
// Ardougne
|
||||||
GAP_11406, GAP_11429, GAP_11430, STEEP_ROOF, GAP_11630, PLANK_11631, WOODEN_BEAMS,
|
GAP_11406, GAP_11429, GAP_11430, STEEP_ROOF, GAP_11630, PLANK_11631, WOODEN_BEAMS
|
||||||
|
);
|
||||||
// Shortcuts
|
|
||||||
|
|
||||||
|
public static final Set<Integer> SHORTCUT_OBSTACLE_IDS = Sets.newHashSet(
|
||||||
// Grand Exchange
|
// Grand Exchange
|
||||||
UNDERWALL_TUNNEL_16529, UNDERWALL_TUNNEL_16530,
|
UNDERWALL_TUNNEL_16529, UNDERWALL_TUNNEL_16530,
|
||||||
// South Varrock
|
// South Varrock
|
||||||
|
|||||||
Reference in New Issue
Block a user