diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-25 13:52:03 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-25 13:52:03 +0100 |
commit | dfdf589f0617b08828ac93d751450f701460c597 (patch) | |
tree | 5037a025b82a51dc21ff6ecdbd38363f535f9423 /src/main/java | |
parent | 3f25c2c3dbd31adfe9a2b1b5dd2a996b05528d19 (diff) | |
download | skyhanni-dfdf589f0617b08828ac93d751450f701460c597.tar.gz skyhanni-dfdf589f0617b08828ac93d751450f701460c597.tar.bz2 skyhanni-dfdf589f0617b08828ac93d751450f701460c597.zip |
Added option to exclude hidden items in the total price calculation.
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/misc/TrackerConfig.java | 5 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/TrackerConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/TrackerConfig.java index dd91010ed..a8f76cad1 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/misc/TrackerConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/TrackerConfig.java @@ -28,4 +28,9 @@ public class TrackerConfig { @ConfigOption(name = "Recent Drops", desc = "Highlight the amount in green on recently gained items.") @ConfigEditorBoolean public boolean showRecentDrops = true; + + @Expose + @ConfigOption(name = "Exclude Hidden", desc = "Exclude hidden items in the total price calculation.") + @ConfigEditorBoolean + public boolean excludeHiddenItemsInPrice = false; } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt index b20515cd4..f5510b13d 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt @@ -112,7 +112,9 @@ class SkyHanniItemTracker<Data : ItemTrackerData>( if (isInventoryOpen() || !hidden) { items[renderable] = price } - profit += price + if (!hidden || !config.excludeHiddenItemsInPrice) { + profit += price + } } for (text in items.sortedDesc().keys) { |