aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/CroesusChestTracker.kt10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/CroesusChestTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/CroesusChestTracker.kt
index 176a40f59..a8a440617 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/CroesusChestTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/CroesusChestTracker.kt
@@ -12,6 +12,7 @@ import at.hannibal2.skyhanni.events.RenderInventoryItemTipEvent
import at.hannibal2.skyhanni.events.RenderItemTipEvent
import at.hannibal2.skyhanni.features.dungeon.DungeonAPI.DungeonChest
import at.hannibal2.skyhanni.test.command.ErrorManager
+import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.InventoryUtils
import at.hannibal2.skyhanni.utils.InventoryUtils.getAmountInInventory
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
@@ -261,6 +262,15 @@ class CroesusChestTracker {
private val croesusChests get() = ProfileStorageData.profileSpecific?.dungeons?.runs
+ fun resetChest() = croesusChests?.let {
+ it.clear()
+ it.addAll(generateMaxChest())
+ ChatUtils.chat("Kismet State was cleared!")
+ }
+
+ fun generateMaxChest() = generateSequence { DungeonRunInfo() }.take(maxChests)
+ fun generateMaxChestAsList() = generateMaxChest().toList()
+
fun getLastActiveChest(includeDungeonKey: Boolean = false) =
(croesusChests?.indexOfLast {
it.floor != null &&