ground items: add option to deprioritize hidden item options

This commit is contained in:
Adam
2022-01-12 14:30:22 -05:00
parent ac547210f7
commit 077c0a78b3
2 changed files with 16 additions and 0 deletions

View File

@@ -131,6 +131,17 @@ public interface GroundItemsConfig extends Config
{
return false;
}
@ConfigItem(
keyName = "deprioritizeHiddenItems",
name = "Deprioritize Menu Hidden Items",
description = "Depriotizies the menu options for items which are hidden, requiring a right click to pick up.",
position = 5
)
default boolean deprioritizeHiddenItems()
{
return false;
}
@ConfigItem(
keyName = "highlightTiles",

View File

@@ -527,6 +527,11 @@ public class GroundItemsPlugin extends Plugin
{
lastEntry.setTarget(lastEntry.getTarget() + " (" + quantity + ")");
}
if (hidden != null && highlighted == null && config.deprioritizeHiddenItems())
{
lastEntry.setDeprioritized(true);
}
}
}