ground items: Add toggle to show highlighted items only
This commit is contained in:
@@ -147,4 +147,14 @@ public interface GroundItemsConfig extends Config
|
|||||||
{
|
{
|
||||||
return Color.decode("#FF66B2");
|
return Color.decode("#FF66B2");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "showHighlightedOnly",
|
||||||
|
name = "Show Highlighted items only",
|
||||||
|
description = "Configures whether or not to draw items only on your highlighted list"
|
||||||
|
)
|
||||||
|
default boolean showHighlightedOnly()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -154,7 +154,9 @@ public class GroundItemsOverlay extends Overlay
|
|||||||
ItemComposition itemDefinition = itemManager.getItemComposition(itemId);
|
ItemComposition itemDefinition = itemManager.getItemComposition(itemId);
|
||||||
|
|
||||||
Integer currentQuantity = items.get(itemId);
|
Integer currentQuantity = items.get(itemId);
|
||||||
if (!hiddenItems.contains(itemDefinition.getName().toLowerCase()))
|
|
||||||
|
String itemName = itemDefinition.getName().toLowerCase();
|
||||||
|
if (config.showHighlightedOnly() ? highlightedItems.contains(itemName) : !hiddenItems.contains(itemName))
|
||||||
{
|
{
|
||||||
if (itemDefinition.getNote() != -1)
|
if (itemDefinition.getNote() != -1)
|
||||||
{
|
{
|
||||||
@@ -180,8 +182,8 @@ public class GroundItemsOverlay extends Overlay
|
|||||||
alchPrice = Math.round(itemDefinition.getPrice() * HIGH_ALCHEMY_CONSTANT) * quantity;
|
alchPrice = Math.round(itemDefinition.getPrice() * HIGH_ALCHEMY_CONSTANT) * quantity;
|
||||||
}
|
}
|
||||||
if (highlightedItems.contains(itemDefinition.getName().toLowerCase()) ||
|
if (highlightedItems.contains(itemDefinition.getName().toLowerCase()) ||
|
||||||
gePrice == 0 || ((gePrice >= config.getHideUnderGeValue()) &&
|
gePrice == 0 || ((gePrice >= config.getHideUnderGeValue()) &&
|
||||||
(alchPrice >= config.getHideUnderHAValue())))
|
(alchPrice >= config.getHideUnderHAValue())))
|
||||||
{
|
{
|
||||||
items.put(itemId, quantity);
|
items.put(itemId, quantity);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user