Ground items config options

This commit is contained in:
Scott Burns
2019-05-23 11:03:35 +02:00
parent 10b300285a
commit f99e9705a0
6 changed files with 360 additions and 228 deletions

View File

@@ -29,6 +29,7 @@ import java.awt.Color;
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.Stub;
import net.runelite.client.plugins.grounditems.config.ItemHighlightMode; import net.runelite.client.plugins.grounditems.config.ItemHighlightMode;
import net.runelite.client.plugins.grounditems.config.MenuHighlightMode; import net.runelite.client.plugins.grounditems.config.MenuHighlightMode;
import net.runelite.client.plugins.grounditems.config.PriceDisplayMode; import net.runelite.client.plugins.grounditems.config.PriceDisplayMode;
@@ -38,11 +39,70 @@ import net.runelite.client.plugins.grounditems.config.ValueCalculationMode;
@ConfigGroup("grounditems") @ConfigGroup("grounditems")
public interface GroundItemsConfig extends Config public interface GroundItemsConfig extends Config
{ {
@ConfigItem(
keyName = "colorsStub",
name = "Colors",
description = "",
position = 1
)
default Stub colorsStub()
{
return new Stub();
}
@ConfigItem(
keyName = "defaultColor",
name = "Default items",
description = "Configures the color for default, non-highlighted items",
position = 2,
parent = "colorsStub"
)
default Color defaultColor()
{
return Color.WHITE;
}
@ConfigItem(
keyName = "highlightedColor",
name = "Highlighted items",
description = "Configures the color for highlighted items",
position = 3,
parent = "colorsStub"
)
default Color highlightedColor()
{
return Color.decode("#AA00FF");
}
@ConfigItem(
keyName = "hiddenColor",
name = "Hidden items",
description = "Configures the color for hidden items in right-click menu and when holding ALT",
position = 4,
parent = "colorsStub"
)
default Color hiddenColor()
{
return Color.GRAY;
}
@ConfigItem(
keyName = "highlightedStub",
name = "Highlighted",
description = "",
position = 5
)
default Stub highlightedStub()
{
return new Stub();
}
@ConfigItem( @ConfigItem(
keyName = "highlightedItems", keyName = "highlightedItems",
name = "Highlighted Items", name = "Highlighted Items",
description = "Configures specifically highlighted ground items. Format: (item), (item)", description = "Configures specifically highlighted ground items. Format: (item), (item)",
position = 0 position = 6,
parent = "highlightedStub"
) )
default String getHighlightItems() default String getHighlightItems()
{ {
@@ -56,128 +116,24 @@ public interface GroundItemsConfig extends Config
) )
void setHighlightedItem(String key); void setHighlightedItem(String key);
@ConfigItem(
keyName = "hiddenItems",
name = "Hidden Items",
description = "Configures hidden ground items. Format: (item), (item)",
position = 1
)
default String getHiddenItems()
{
return "Vial, Ashes, Coins, Bones, Bucket, Jug, Seaweed";
}
@ConfigItem(
keyName = "hiddenItems",
name = "",
description = ""
)
void setHiddenItems(String key);
@ConfigItem( @ConfigItem(
keyName = "showHighlightedOnly", keyName = "showHighlightedOnly",
name = "Show Highlighted items only", name = "Show Highlighted items only",
description = "Configures whether or not to draw items only on your highlighted list", description = "Configures whether or not to draw items only on your highlighted list",
position = 2 position = 7,
parent = "highlightedStub"
) )
default boolean showHighlightedOnly() default boolean showHighlightedOnly()
{ {
return false; return false;
} }
@ConfigItem(
keyName = "dontHideUntradeables",
name = "Do not hide untradeables",
description = "Configures whether or not untradeable items ignore hiding under settings",
position = 3
)
default boolean dontHideUntradeables()
{
return true;
}
@ConfigItem(
keyName = "showMenuItemQuantities",
name = "Show Menu Item Quantities",
description = "Configures whether or not to show the item quantities in the menu",
position = 4
)
default boolean showMenuItemQuantities()
{
return true;
}
@ConfigItem(
keyName = "recolorMenuHiddenItems",
name = "Recolor Menu Hidden Items",
description = "Configures whether or not hidden items in right click menu will be recolored",
position = 5
)
default boolean recolorMenuHiddenItems()
{
return false;
}
@ConfigItem(
keyName = "highlightTiles",
name = "Highlight Tiles",
description = "Configures whether or not to highlight tiles containing ground items",
position = 6
)
default boolean highlightTiles()
{
return false;
}
@ConfigItem(
keyName = "notifyHighlightedDrops",
name = "Notify for Highlighted drops",
description = "Configures whether or not to notify for drops on your highlighted list",
position = 7
)
default boolean notifyHighlightedDrops()
{
return false;
}
@ConfigItem(
keyName = "priceDisplayMode",
name = "Price Display Mode",
description = "Configures what price types are shown alongside of ground item name",
position = 8
)
default PriceDisplayMode priceDisplayMode()
{
return PriceDisplayMode.BOTH;
}
@ConfigItem(
keyName = "itemHighlightMode",
name = "Item Highlight Mode",
description = "Configures how ground items will be highlighted",
position = 9
)
default ItemHighlightMode itemHighlightMode()
{
return ItemHighlightMode.BOTH;
}
@ConfigItem(
keyName = "menuHighlightMode",
name = "Menu Highlight Mode",
description = "Configures what to highlight in right-click menu",
position = 10
)
default MenuHighlightMode menuHighlightMode()
{
return MenuHighlightMode.NAME;
}
@ConfigItem( @ConfigItem(
keyName = "highlightValueCalculation", keyName = "highlightValueCalculation",
name = "Highlight Value Calculation", name = "Highlighted Value Calculation",
description = "Configures which coin value is used to determine highlight color", description = "Configures which coin value is used to determine highlight color",
position = 11 position = 8,
parent = "highlightedStub"
) )
default ValueCalculationMode valueCalculationMode() default ValueCalculationMode valueCalculationMode()
{ {
@@ -188,18 +144,87 @@ public interface GroundItemsConfig extends Config
keyName = "highlightOverValue2", keyName = "highlightOverValue2",
name = "Highlight > Value", name = "Highlight > Value",
description = "Configures highlighted ground items over either GE or HA value", description = "Configures highlighted ground items over either GE or HA value",
position = 12 position = 9,
parent = "highlightedStub"
) )
default int getHighlightOverValue() default int getHighlightOverValue()
{ {
return 0; return 0;
} }
@ConfigItem(
keyName = "notifyHighlightedDrops",
name = "Notify for Highlighted drops",
description = "Configures whether or not to notify for drops on your highlighted list",
position = 10,
parent = "highlightStub"
)
default boolean notifyHighlightedDrops()
{
return false;
}
@ConfigItem(
keyName = "hiddenStub",
name = "Hidden",
description = "",
position = 11
)
default Stub hiddenStub()
{
return new Stub();
}
@ConfigItem(
keyName = "dontHideUntradeables",
name = "Do not hide untradeables",
description = "Configures whether or not untradeable items ignore hiding under settings",
position = 12,
parent = "hiddenStub"
)
default boolean dontHideUntradeables()
{
return true;
}
@ConfigItem(
keyName = "hiddenItems",
name = "Hidden Items",
description = "Configures hidden ground items. Format: (item), (item)",
position = 13,
parent = "hiddenStub"
)
default String getHiddenItems()
{
return "Vial, Ashes, Coins, Bones, Bucket, Jug, Seaweed";
}
@ConfigItem(
keyName = "hiddenItems",
name = "",
description = "",
parent = "hiddenStub"
)
void setHiddenItems(String key);
@ConfigItem(
keyName = "recolorMenuHiddenItems",
name = "Recolor Menu Hidden Items",
description = "Configures whether or not hidden items in right click menu will be recolored",
position = 14,
parent = "hiddenStub"
)
default boolean recolorMenuHiddenItems()
{
return false;
}
@ConfigItem( @ConfigItem(
keyName = "hideUnderValue", keyName = "hideUnderValue",
name = "Hide < Value", name = "Hide < Value",
description = "Configures hidden ground items under both GE and HA value", description = "Configures hidden ground items under both GE and HA value",
position = 13 position = 15,
parent = "hiddenStub"
) )
default int getHideUnderValue() default int getHideUnderValue()
{ {
@@ -207,43 +232,92 @@ public interface GroundItemsConfig extends Config
} }
@ConfigItem( @ConfigItem(
keyName = "defaultColor", keyName = "removeIgnored",
name = "Default items color", name = "Hide Hidden",
description = "Configures the color for default, non-highlighted items", description = "Remove take option for items that are on the hidden items list.",
position = 14 position = 16,
parent = "hiddenStub"
) )
default Color defaultColor() default boolean removeIgnored()
{ {
return Color.WHITE; return false;
} }
@ConfigItem( @ConfigItem(
keyName = "highlightedColor", keyName = "rightClickHidden",
name = "Highlighted items color", name = "Right click hidden items",
description = "Configures the color for highlighted items", description = "Places hidden items below the 'Walk here' option, making it so that you need to right click to pick them up",
position = 15 position = 17,
parent = "hiddenStub"
) )
default Color highlightedColor() default boolean rightClickHidden()
{ {
return Color.decode("#AA00FF"); return false;
} }
@ConfigItem( @ConfigItem(
keyName = "hiddenColor", keyName = "highlightStub",
name = "Hidden items color", name = "Highlight",
description = "Configures the color for hidden items in right-click menu and when holding ALT", description = "",
position = 16 position = 18
) )
default Color hiddenColor() default Stub highlightStub()
{ {
return Color.GRAY; return new Stub();
}
@ConfigItem(
keyName = "highlightTiles",
name = "Highlight Tiles",
description = "Configures whether or not to highlight tiles containing ground items",
position = 19,
parent = "highlightStub"
)
default boolean highlightTiles()
{
return false;
}
@ConfigItem(
keyName = "itemHighlightMode",
name = "Item Highlight Mode",
description = "Configures how ground items will be highlighted",
position = 20,
parent = "highlightStub"
)
default ItemHighlightMode itemHighlightMode()
{
return ItemHighlightMode.BOTH;
}
@ConfigItem(
keyName = "menuHighlightMode",
name = "Menu Highlight Mode",
description = "Configures what to highlight in right-click menu",
position = 21,
parent = "highlightStub"
)
default MenuHighlightMode menuHighlightMode()
{
return MenuHighlightMode.NAME;
}
@ConfigItem(
keyName = "lowValueStub",
name = "Low value",
description = "",
position = 22
)
default Stub lowValueStub()
{
return new Stub();
} }
@ConfigItem( @ConfigItem(
keyName = "lowValueColor", keyName = "lowValueColor",
name = "Low value items color", name = "Low value color",
description = "Configures the color for low value items", description = "Configures the color for low value items",
position = 17 position = 23,
parent = "lowValueStub"
) )
default Color lowValueColor() default Color lowValueColor()
{ {
@@ -254,7 +328,8 @@ public interface GroundItemsConfig extends Config
keyName = "lowValuePrice", keyName = "lowValuePrice",
name = "Low value price", name = "Low value price",
description = "Configures the start price for low value items", description = "Configures the start price for low value items",
position = 18 position = 24,
parent = "lowValueStub"
) )
default int lowValuePrice() default int lowValuePrice()
{ {
@@ -265,18 +340,31 @@ public interface GroundItemsConfig extends Config
keyName = "notifyLowValueDrops", keyName = "notifyLowValueDrops",
name = "Notify for low value drops", name = "Notify for low value drops",
description = "Configures whether or not to notify for drops of low value", description = "Configures whether or not to notify for drops of low value",
position = 19 position = 25,
parent = "lowValueStub"
) )
default boolean notifyLowValueDrops() default boolean notifyLowValueDrops()
{ {
return false; return false;
} }
@ConfigItem(
keyName = "mediumValueStub",
name = "Medium value",
description = "",
position = 26
)
default Stub mediumValueStub()
{
return new Stub();
}
@ConfigItem( @ConfigItem(
keyName = "mediumValueColor", keyName = "mediumValueColor",
name = "Medium value items color", name = "Medium value color",
description = "Configures the color for medium value items", description = "Configures the color for medium value items",
position = 20 position = 27,
parent = "mediumValueStub"
) )
default Color mediumValueColor() default Color mediumValueColor()
{ {
@@ -287,7 +375,8 @@ public interface GroundItemsConfig extends Config
keyName = "mediumValuePrice", keyName = "mediumValuePrice",
name = "Medium value price", name = "Medium value price",
description = "Configures the start price for medium value items", description = "Configures the start price for medium value items",
position = 21 position = 28,
parent = "mediumValueStub"
) )
default int mediumValuePrice() default int mediumValuePrice()
{ {
@@ -298,18 +387,31 @@ public interface GroundItemsConfig extends Config
keyName = "notifyMediumValueDrops", keyName = "notifyMediumValueDrops",
name = "Notify for medium value drops", name = "Notify for medium value drops",
description = "Configures whether or not to notify for drops of medium value", description = "Configures whether or not to notify for drops of medium value",
position = 22 position = 29,
parent = "mediumValueStub"
) )
default boolean notifyMediumValueDrops() default boolean notifyMediumValueDrops()
{ {
return false; return false;
} }
@ConfigItem(
keyName = "highValueStub",
name = "High value",
description = "",
position = 30
)
default Stub highValueStub()
{
return new Stub();
}
@ConfigItem( @ConfigItem(
keyName = "highValueColor", keyName = "highValueColor",
name = "High value items color", name = "High value color",
description = "Configures the color for high value items", description = "Configures the color for high value items",
position = 23 position = 31,
parent = "highValueStub"
) )
default Color highValueColor() default Color highValueColor()
{ {
@@ -320,7 +422,8 @@ public interface GroundItemsConfig extends Config
keyName = "highValuePrice", keyName = "highValuePrice",
name = "High value price", name = "High value price",
description = "Configures the start price for high value items", description = "Configures the start price for high value items",
position = 24 position = 32,
parent = "highValueStub"
) )
default int highValuePrice() default int highValuePrice()
{ {
@@ -331,18 +434,31 @@ public interface GroundItemsConfig extends Config
keyName = "notifyHighValueDrops", keyName = "notifyHighValueDrops",
name = "Notify for high value drops", name = "Notify for high value drops",
description = "Configures whether or not to notify for drops of high value", description = "Configures whether or not to notify for drops of high value",
position = 25 position = 33,
parent = "highValueStub"
) )
default boolean notifyHighValueDrops() default boolean notifyHighValueDrops()
{ {
return false; return false;
} }
@ConfigItem(
keyName = "insaneValueStub",
name = "Insane value",
description = "",
position = 34
)
default Stub insaneValueStub()
{
return new Stub();
}
@ConfigItem( @ConfigItem(
keyName = "insaneValueColor", keyName = "insaneValueColor",
name = "Insane value items color", name = "Insane value items color",
description = "Configures the color for insane value items", description = "Configures the color for insane value items",
position = 26 position = 35,
parent = "insaneValueStub"
) )
default Color insaneValueColor() default Color insaneValueColor()
{ {
@@ -353,7 +469,8 @@ public interface GroundItemsConfig extends Config
keyName = "insaneValuePrice", keyName = "insaneValuePrice",
name = "Insane value price", name = "Insane value price",
description = "Configures the start price for insane value items", description = "Configures the start price for insane value items",
position = 27 position = 36,
parent = "insaneValueStub"
) )
default int insaneValuePrice() default int insaneValuePrice()
{ {
@@ -364,73 +481,102 @@ public interface GroundItemsConfig extends Config
keyName = "notifyInsaneValueDrops", keyName = "notifyInsaneValueDrops",
name = "Notify for insane value drops", name = "Notify for insane value drops",
description = "Configures whether or not to notify for drops of insane value", description = "Configures whether or not to notify for drops of insane value",
position = 28 position = 37,
parent = "insaneValueStub"
) )
default boolean notifyInsaneValueDrops() default boolean notifyInsaneValueDrops()
{ {
return false; return false;
} }
@ConfigItem(
keyName = "priceStub",
name = "Price",
description = "",
position = 38
)
default Stub priceStub()
{
return new Stub();
}
@ConfigItem(
keyName = "priceDisplayMode",
name = "Price Display Mode",
description = "Configures what price types are shown alongside of ground item name",
position = 39,
parent = "priceStub"
)
default PriceDisplayMode priceDisplayMode()
{
return PriceDisplayMode.BOTH;
}
@ConfigItem(
keyName = "sortByGEPrice",
name = "Sort by GE price",
description = "Sorts ground items by GE price, instead of alch value",
position = 40,
parent = "priceStub"
)
default boolean sortByGEPrice()
{
return false;
}
@ConfigItem(
keyName = "miscStub",
name = "Miscellaneous",
description = "",
position = 41
)
default Stub miscStub()
{
return new Stub();
}
@ConfigItem(
keyName = "showMenuItemQuantities",
name = "Show Menu Item Quantities",
description = "Configures whether or not to show the item quantities in the menu",
position = 42,
parent = "miscStub"
)
default boolean showMenuItemQuantities()
{
return true;
}
@ConfigItem(
keyName = "collapseEntries",
name = "Collapse ground item menu entries",
description = "Collapses ground item menu entries together and appends count",
position = 43,
parent = "miscStub"
)
default boolean collapseEntries()
{
return false;
}
@ConfigItem( @ConfigItem(
keyName = "onlyShowLoot", keyName = "onlyShowLoot",
name = "Only show loot", name = "Only show loot",
description = "Only shows drops from NPCs and players", description = "Only shows drops from NPCs and players",
position = 29 position = 44,
parent = "miscStub"
) )
default boolean onlyShowLoot() default boolean onlyShowLoot()
{ {
return false; return false;
} }
@ConfigItem(
keyName = "doubleTapDelay",
name = "Delay for double-tap ALT to hide",
description = "Decrease this number if you accidentally hide ground items often. (0 = Disabled)",
position = 30
)
default int doubleTapDelay()
{
return 250;
}
@ConfigItem(
keyName = "collapseEntries",
name = "Collapse ground item menu entries",
description = "Collapses ground item menu entries together and appends count",
position = 31
)
default boolean collapseEntries()
{
return false;
}
@ConfigItem(
keyName = "removeIgnored",
name = "Hide Ignored",
description = "Remove take option for items that are on the hidden items list.",
position = 32
)
default boolean removeIgnored()
{
return false;
}
@ConfigItem(
keyName = "toggleOutline",
name = "Text Outline",
description = "Use an outline around text instead of a text shadow",
position = 33
)
default boolean toggleOutline()
{
return false;
}
@ConfigItem( @ConfigItem(
keyName = "showGroundItemDuration", keyName = "showGroundItemDuration",
name = "Show time remaining", name = "Show time remaining",
description = "Turn on a countdown timer to show how long an item will remain on the ground", description = "Turn on a countdown timer to show how long an item will remain on the ground",
position = 34 position = 45,
parent = "miscStub"
) )
default TimerDisplayMode showGroundItemDuration() default TimerDisplayMode showGroundItemDuration()
{ {
@@ -438,23 +584,25 @@ public interface GroundItemsConfig extends Config
} }
@ConfigItem( @ConfigItem(
keyName = "sortByGEPrice", keyName = "doubleTapDelay",
name = "Sort by GE price", name = "Delay for double-tap ALT to hide",
description = "Sorts ground items by GE price, instead of alch value", description = "Decrease this number if you accidentally hide ground items often. (0 = Disabled)",
position = 35 position = 46,
parent = "miscStub"
) )
default boolean sortByGEPrice() default int doubleTapDelay()
{ {
return false; return 250;
} }
@ConfigItem( @ConfigItem(
keyName = "rightClickHidden", keyName = "toggleOutline",
name = "Right click hidden items", name = "Text Outline",
description = "Places hidden items below the 'Walk here' option, making it so that you need to right click to pick them up", description = "Use an outline around text instead of a text shadow",
position = 36 position = 47,
parent = "miscStub"
) )
default boolean rightClickHidden() default boolean toggleOutline()
{ {
return false; return false;
} }

View File

@@ -32,7 +32,7 @@ import lombok.RequiredArgsConstructor;
public enum ItemHighlightMode public enum ItemHighlightMode
{ {
OVERLAY("Overlay"), OVERLAY("Overlay"),
MENU("Right-click menu"), MENU("Right-click"),
BOTH("Both"); BOTH("Both");
private final String name; private final String name;

View File

@@ -32,7 +32,7 @@ import lombok.RequiredArgsConstructor;
public enum MenuHighlightMode public enum MenuHighlightMode
{ {
OPTION("Menu option"), OPTION("Menu option"),
NAME("Menu item name"), NAME("Menu item"),
BOTH("Both"); BOTH("Both");
private final String name; private final String name;

View File

@@ -31,16 +31,8 @@ import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor @RequiredArgsConstructor
public enum PriceDisplayMode public enum PriceDisplayMode
{ {
HA("High Alchemy"), HA,
GE("Grand Exchange"), GE,
BOTH("Both"), BOTH,
OFF("Off"); OFF;
private final String name;
@Override
public String toString()
{
return name;
}
} }

View File

@@ -32,7 +32,7 @@ import lombok.RequiredArgsConstructor;
public enum TimerDisplayMode public enum TimerDisplayMode
{ {
ALWAYS("Always"), ALWAYS("Always"),
HOTKEY_PRESSED("When Hotkey Pressed"), HOTKEY_PRESSED("Hotkey"),
NEVER("Never"); NEVER("Never");
private final String name; private final String name;

View File

@@ -32,15 +32,7 @@ import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor @RequiredArgsConstructor
public enum ValueCalculationMode public enum ValueCalculationMode
{ {
HA("High Alchemy"), // calc highlight by HA value HA, // calc highlight by HA value
GE("Grand Exchange"), // calc by GE GE, // calc by GE
HIGHEST("Highest"); // use whatever is highest. HIGHEST;
private final String name;
@Override
public String toString()
{
return name;
}
} }