agility plugin: add config for Prifddinas portal color
This commit is contained in:
@@ -122,11 +122,33 @@ public interface AgilityConfig extends Config
|
|||||||
return Color.RED;
|
return Color.RED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "highlightPortals",
|
||||||
|
name = "Highlight Portals",
|
||||||
|
description = "Enable/disable the highlighting of Prifddinas portals",
|
||||||
|
position = 8
|
||||||
|
)
|
||||||
|
default boolean highlightPortals()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "portalsHighlight",
|
||||||
|
name = "Portals Highlight Color",
|
||||||
|
description = "Color of highlighted Prifddinas portals",
|
||||||
|
position = 9
|
||||||
|
)
|
||||||
|
default Color getPortalsColor()
|
||||||
|
{
|
||||||
|
return Color.MAGENTA;
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "highlightShortcuts",
|
keyName = "highlightShortcuts",
|
||||||
name = "Highlight Agility Shortcuts",
|
name = "Highlight Agility Shortcuts",
|
||||||
description = "Enable/disable the highlighting of Agility shortcuts",
|
description = "Enable/disable the highlighting of Agility shortcuts",
|
||||||
position = 8
|
position = 10
|
||||||
)
|
)
|
||||||
default boolean highlightShortcuts()
|
default boolean highlightShortcuts()
|
||||||
{
|
{
|
||||||
@@ -137,7 +159,7 @@ public interface AgilityConfig extends Config
|
|||||||
keyName = "trapOverlay",
|
keyName = "trapOverlay",
|
||||||
name = "Show Trap Overlay",
|
name = "Show Trap Overlay",
|
||||||
description = "Enable/disable the highlighting of traps on Agility courses",
|
description = "Enable/disable the highlighting of traps on Agility courses",
|
||||||
position = 9
|
position = 11
|
||||||
)
|
)
|
||||||
default boolean showTrapOverlay()
|
default boolean showTrapOverlay()
|
||||||
{
|
{
|
||||||
@@ -148,7 +170,7 @@ public interface AgilityConfig extends Config
|
|||||||
keyName = "trapHighlight",
|
keyName = "trapHighlight",
|
||||||
name = "Trap Overlay Color",
|
name = "Trap Overlay Color",
|
||||||
description = "Color of Agility trap overlay",
|
description = "Color of Agility trap overlay",
|
||||||
position = 10
|
position = 12
|
||||||
)
|
)
|
||||||
default Color getTrapColor()
|
default Color getTrapColor()
|
||||||
{
|
{
|
||||||
@@ -159,7 +181,7 @@ public interface AgilityConfig extends Config
|
|||||||
keyName = "agilityArenaNotifier",
|
keyName = "agilityArenaNotifier",
|
||||||
name = "Agility Arena notifier",
|
name = "Agility Arena notifier",
|
||||||
description = "Notify on ticket location change in Agility Arena",
|
description = "Notify on ticket location change in Agility Arena",
|
||||||
position = 11
|
position = 13
|
||||||
)
|
)
|
||||||
default boolean notifyAgilityArena()
|
default boolean notifyAgilityArena()
|
||||||
{
|
{
|
||||||
@@ -170,7 +192,7 @@ public interface AgilityConfig extends Config
|
|||||||
keyName = "agilityArenaTimer",
|
keyName = "agilityArenaTimer",
|
||||||
name = "Agility Arena timer",
|
name = "Agility Arena timer",
|
||||||
description = "Configures whether Agility Arena timer is displayed",
|
description = "Configures whether Agility Arena timer is displayed",
|
||||||
position = 12
|
position = 14
|
||||||
)
|
)
|
||||||
default boolean showAgilityArenaTimer()
|
default boolean showAgilityArenaTimer()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -103,6 +103,11 @@ class AgilityOverlay extends Overlay
|
|||||||
configColor = config.getMarkColor();
|
configColor = config.getMarkColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config.highlightPortals() && Obstacles.PORTAL_OBSTACLE_IDS.contains(object.getId()))
|
||||||
|
{
|
||||||
|
configColor = config.getPortalsColor();
|
||||||
|
}
|
||||||
|
|
||||||
if (objectClickbox.contains(mousePosition.getX(), mousePosition.getY()))
|
if (objectClickbox.contains(mousePosition.getX(), mousePosition.getY()))
|
||||||
{
|
{
|
||||||
graphics.setColor(configColor.darker());
|
graphics.setColor(configColor.darker());
|
||||||
|
|||||||
@@ -405,6 +405,7 @@ public class AgilityPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Obstacles.COURSE_OBSTACLE_IDS.contains(newObject.getId()) ||
|
if (Obstacles.COURSE_OBSTACLE_IDS.contains(newObject.getId()) ||
|
||||||
|
Obstacles.PORTAL_OBSTACLE_IDS.contains(newObject.getId()) ||
|
||||||
(Obstacles.TRAP_OBSTACLE_IDS.contains(newObject.getId())
|
(Obstacles.TRAP_OBSTACLE_IDS.contains(newObject.getId())
|
||||||
&& Obstacles.TRAP_OBSTACLE_REGIONS.contains(newObject.getWorldLocation().getRegionID())))
|
&& Obstacles.TRAP_OBSTACLE_REGIONS.contains(newObject.getWorldLocation().getRegionID())))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -94,7 +94,10 @@ class Obstacles
|
|||||||
ZIP_LINE_11645, ZIP_LINE_11646,
|
ZIP_LINE_11645, ZIP_LINE_11646,
|
||||||
// Prifddinas
|
// Prifddinas
|
||||||
LADDER_36221, TIGHTROPE_36225, CHIMNEY_36227, ROOF_EDGE, DARK_HOLE_36229, LADDER_36231, LADDER_36232,
|
LADDER_36221, TIGHTROPE_36225, CHIMNEY_36227, ROOF_EDGE, DARK_HOLE_36229, LADDER_36231, LADDER_36232,
|
||||||
ROPE_BRIDGE_36233, TIGHTROPE_36234, ROPE_BRIDGE_36235, TIGHTROPE_36236, TIGHTROPE_36237, DARK_HOLE_36238,
|
ROPE_BRIDGE_36233, TIGHTROPE_36234, ROPE_BRIDGE_36235, TIGHTROPE_36236, TIGHTROPE_36237, DARK_HOLE_36238
|
||||||
|
);
|
||||||
|
|
||||||
|
static final Set<Integer> PORTAL_OBSTACLE_IDS = ImmutableSet.of(
|
||||||
// Prifddinas portals
|
// Prifddinas portals
|
||||||
NULL_36241, NULL_36242, NULL_36243, NULL_36244, NULL_36245, NULL_36246
|
NULL_36241, NULL_36242, NULL_36243, NULL_36244, NULL_36245, NULL_36246
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user