Add Agility shortcut highlight toggle
This commit is contained in:
@@ -91,4 +91,14 @@ public interface AgilityConfig extends Config
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,6 +68,11 @@ public class AgilityOverlay extends Overlay
|
||||
final Tile markOfGrace = plugin.getMarkOfGrace();
|
||||
plugin.getObstacles().forEach((object, tile) ->
|
||||
{
|
||||
if (Obstacles.SHORTCUT_OBSTACLE_IDS.contains(object.getId()) && !config.highlightShortcuts())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (tile.getPlane() == client.getPlane()
|
||||
&& object.getLocalLocation().distanceTo(playerLocation) < MAX_DISTANCE)
|
||||
{
|
||||
|
||||
@@ -281,7 +281,13 @@ public class AgilityPlugin extends Plugin
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ import static net.runelite.api.ObjectID.*;
|
||||
|
||||
public class Obstacles
|
||||
{
|
||||
public static final Set<Integer> OBSTACLE_IDS = Sets.newHashSet(
|
||||
public static final Set<Integer> COURSE_OBSTACLE_IDS = Sets.newHashSet(
|
||||
// Gnome
|
||||
OBSTACLE_NET_23134, TREE_BRANCH_23559, TREE_BRANCH_23560, OBSTACLE_NET_23135, OBSTACLE_PIPE_23138,
|
||||
OBSTACLE_PIPE_23139, LOG_BALANCE_23145, BALANCING_ROPE_23557,
|
||||
@@ -73,10 +73,10 @@ public class Obstacles
|
||||
// Rellaka
|
||||
ROUGH_WALL_11391, GAP_11392, TIGHTROPE_11393, GAP_11395, GAP_11396, TIGHTROPE_11397, PILE_OF_FISH,
|
||||
// Ardougne
|
||||
GAP_11406, GAP_11429, GAP_11430, STEEP_ROOF, GAP_11630, PLANK_11631, WOODEN_BEAMS,
|
||||
|
||||
// Shortcuts
|
||||
GAP_11406, GAP_11429, GAP_11430, STEEP_ROOF, GAP_11630, PLANK_11631, WOODEN_BEAMS
|
||||
);
|
||||
|
||||
public static final Set<Integer> SHORTCUT_OBSTACLE_IDS = Sets.newHashSet(
|
||||
// Grand Exchange
|
||||
UNDERWALL_TUNNEL_16529, UNDERWALL_TUNNEL_16530,
|
||||
// South Varrock
|
||||
|
||||
Reference in New Issue
Block a user