diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-07 22:54:04 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-07 22:54:04 +0100 |
commit | fccea080f5b8eaf561e83dc62b84a3cd5ded5a8f (patch) | |
tree | 0f2c7e3ed7d30d014d4ee978098b5475e5fd30f9 /src/main/java/at/hannibal2/skyhanni/utils/tracker | |
parent | e0ef36326d439cfb376a44d005d3b8c7299c634b (diff) | |
download | skyhanni-fccea080f5b8eaf561e83dc62b84a3cd5ded5a8f.tar.gz skyhanni-fccea080f5b8eaf561e83dc62b84a3cd5ded5a8f.tar.bz2 skyhanni-fccea080f5b8eaf561e83dc62b84a3cd5ded5a8f.zip |
Added more Armor Drop Tracker features. Added command /shresetarmordroptracker to reset the full data, added session support and added button to reset the current session.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/tracker')
4 files changed, 5 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/tracker/DisplayMode.kt b/src/main/java/at/hannibal2/skyhanni/utils/tracker/DisplayMode.kt index 6c0e14439..55441953c 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/tracker/DisplayMode.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/tracker/DisplayMode.kt @@ -2,6 +2,6 @@ package at.hannibal2.skyhanni.utils.tracker enum class DisplayMode(val displayName: String) { TOTAL("Total"), - CURRENT("This Session"), + SESSION("This Session"), ; } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SharedTracker.kt b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SharedTracker.kt index 341600467..9b5ae1d90 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SharedTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SharedTracker.kt @@ -11,8 +11,6 @@ class SharedTracker<T : TrackerData>( fun get(displayMode: DisplayMode) = when (displayMode) { DisplayMode.TOTAL -> total - DisplayMode.CURRENT -> currentSession + DisplayMode.SESSION -> currentSession } - - fun getCurrent() = get(TrackerUtils.currentDisplayMode) } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt index 6ff8febc7..e1b4c42ad 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt @@ -26,7 +26,7 @@ class SkyHanniTracker<Data : TrackerData>( } fun addSessionResetButton(list: MutableList<List<Any>>) { - if (inventoryOpen && TrackerUtils.currentDisplayMode == DisplayMode.CURRENT) { + if (inventoryOpen && TrackerUtils.currentDisplayMode == DisplayMode.SESSION) { list.addSessionResetButton(name, getSharedTracker()) { update() } @@ -45,8 +45,7 @@ class SkyHanniTracker<Data : TrackerData>( } } - // rename - fun currentDisplay() = getSharedTracker()?.getCurrent() + fun currentDisplay() = getSharedTracker()?.get(TrackerUtils.currentDisplayMode) fun resetCommand(args: Array<String>, command: String) { TrackerUtils.resetCommand(name, command, args, getSharedTracker()) { diff --git a/src/main/java/at/hannibal2/skyhanni/utils/tracker/TrackerUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/tracker/TrackerUtils.kt index cc2dab37f..ec527c9e5 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/tracker/TrackerUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/tracker/TrackerUtils.kt @@ -30,7 +30,7 @@ object TrackerUtils { "§c$name" ), ) { - data?.get(DisplayMode.CURRENT)?.let { + data?.get(DisplayMode.SESSION)?.let { reset(it) { update() } |