From dfdf589f0617b08828ac93d751450f701460c597 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 25 Nov 2023 13:52:03 +0100 Subject: Added option to exclude hidden items in the total price calculation. --- .../at/hannibal2/skyhanni/config/features/misc/TrackerConfig.java | 5 +++++ .../java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src/main/java/at') 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( if (isInventoryOpen() || !hidden) { items[renderable] = price } - profit += price + if (!hidden || !config.excludeHiddenItemsInPrice) { + profit += price + } } for (text in items.sortedDesc().keys) { -- cgit