Add configs for all 3d highlight overlays
This commit is contained in:
@@ -3,19 +3,27 @@ package com.toofifty.easygiantsfoundry;
|
|||||||
import net.runelite.client.config.Config;
|
import net.runelite.client.config.Config;
|
||||||
import net.runelite.client.config.ConfigGroup;
|
import net.runelite.client.config.ConfigGroup;
|
||||||
import net.runelite.client.config.ConfigItem;
|
import net.runelite.client.config.ConfigItem;
|
||||||
|
import net.runelite.client.config.ConfigSection;
|
||||||
|
|
||||||
@ConfigGroup(EasyGiantsFoundryConfig.GROUP)
|
@ConfigGroup(EasyGiantsFoundryConfig.GROUP)
|
||||||
public interface EasyGiantsFoundryConfig extends Config {
|
public interface EasyGiantsFoundryConfig extends Config {
|
||||||
String GROUP = "easygiantsfoundry";
|
String GROUP = "easygiantsfoundry";
|
||||||
|
|
||||||
|
@ConfigSection(
|
||||||
|
name = "Notifications",
|
||||||
|
description = "Notifications",
|
||||||
|
position = 0
|
||||||
|
)
|
||||||
|
String notificationList = "notificationList";
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "giantsFoundryStageNotification",
|
keyName = "giantsFoundryStageNotification",
|
||||||
name = "Notify stage changes",
|
name = "Notify stage changes",
|
||||||
description = "Notifies just before completing a stage",
|
description = "Notifies just before completing a stage",
|
||||||
position = 0
|
position = 0,
|
||||||
|
section = notificationList
|
||||||
)
|
)
|
||||||
default boolean showGiantsFoundryStageNotifications()
|
default boolean showGiantsFoundryStageNotifications() {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -23,11 +31,73 @@ public interface EasyGiantsFoundryConfig extends Config {
|
|||||||
keyName = "giantsFoundryHeatNotification",
|
keyName = "giantsFoundryHeatNotification",
|
||||||
name = "Notify heat changes",
|
name = "Notify heat changes",
|
||||||
description = "Notifies just before overheating/cooling when using tools",
|
description = "Notifies just before overheating/cooling when using tools",
|
||||||
position = 1
|
position = 1,
|
||||||
|
section = notificationList
|
||||||
)
|
)
|
||||||
default boolean showGiantsFoundryHeatNotifications()
|
default boolean showGiantsFoundryHeatNotifications() {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ConfigSection(
|
||||||
|
name = "Highlights",
|
||||||
|
description = "3D npc/object highlights",
|
||||||
|
position = 1
|
||||||
|
)
|
||||||
|
String highlightList = "highlightList";
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "toolsHighlight",
|
||||||
|
name = "Highlight Tools",
|
||||||
|
description = "Highlights current tool with symbolic colors",
|
||||||
|
position = 0,
|
||||||
|
section = highlightList
|
||||||
|
)
|
||||||
|
default boolean highlightTools() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "waterLavaHighlight",
|
||||||
|
name = "Highlight Waterfall/Lava Pool",
|
||||||
|
description = "Highlight Lava Pool / Waterfall when heat change required",
|
||||||
|
position = 1,
|
||||||
|
section = highlightList
|
||||||
|
)
|
||||||
|
default boolean highlightWaterAndLava() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "mouldHighlight",
|
||||||
|
name = "Highlight Mould",
|
||||||
|
description = "Highlight Mould when it should be clicked",
|
||||||
|
position = 2,
|
||||||
|
section = highlightList
|
||||||
|
)
|
||||||
|
default boolean highlightMould() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "crucibleHighlight",
|
||||||
|
name = "Highlight Crucible",
|
||||||
|
description = "Highlight Crucible when it should be filled/poured",
|
||||||
|
position = 3,
|
||||||
|
section = highlightList
|
||||||
|
)
|
||||||
|
default boolean highlightCrucible() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "kovacHighlight",
|
||||||
|
name = "Highlight Kovac for hand in",
|
||||||
|
description = "Highlight Kovac when sword can be handed in",
|
||||||
|
position = 4,
|
||||||
|
section = highlightList
|
||||||
|
)
|
||||||
|
default boolean highlightKovac() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,27 +95,35 @@ public class FoundryOverlay3D extends Overlay {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
drawKovacIfHandIn(graphics);
|
if (config.highlightKovac())
|
||||||
|
{
|
||||||
|
drawKovacIfHandIn(graphics);
|
||||||
|
}
|
||||||
|
|
||||||
if (state.getCurrentStage() == null)
|
if (state.getCurrentStage() == null)
|
||||||
{
|
{
|
||||||
drawMouldIfNotSet(graphics);
|
if (config.highlightMould())
|
||||||
drawCrucibleIfMouldSet(graphics);
|
{
|
||||||
|
drawMouldIfNotSet(graphics);
|
||||||
|
}
|
||||||
|
if (config.highlightCrucible())
|
||||||
|
{
|
||||||
|
drawCrucibleIfMouldSet(graphics);
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Heat heat = state.getCurrentHeat();
|
|
||||||
Stage stage = state.getCurrentStage();
|
Stage stage = state.getCurrentStage();
|
||||||
|
|
||||||
GameObject stageObject = getStageObject(stage);
|
GameObject stageObject = getStageObject(stage);
|
||||||
if (stageObject == null)
|
if (stageObject == null)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Heat heat = state.getCurrentHeat();
|
||||||
Color color = getObjectColor(stage, heat);
|
Color color = getObjectColor(stage, heat);
|
||||||
Shape objectClickbox = stageObject.getClickbox();
|
Shape objectClickbox = stageObject.getClickbox();
|
||||||
if (objectClickbox != null)
|
if (objectClickbox != null && config.highlightTools())
|
||||||
{
|
{
|
||||||
Point mousePosition = client.getMouseCanvasPosition();
|
Point mousePosition = client.getMouseCanvasPosition();
|
||||||
if (objectClickbox.contains(mousePosition.getX(), mousePosition.getY()))
|
if (objectClickbox.contains(mousePosition.getX(), mousePosition.getY()))
|
||||||
@@ -131,7 +139,7 @@ public class FoundryOverlay3D extends Overlay {
|
|||||||
graphics.fill(objectClickbox);
|
graphics.fill(objectClickbox);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (color.equals(ColorScheme.PROGRESS_ERROR_COLOR))
|
if (color.equals(ColorScheme.PROGRESS_ERROR_COLOR) && config.highlightWaterAndLava())
|
||||||
{
|
{
|
||||||
drawHeatChangers(graphics);
|
drawHeatChangers(graphics);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user