aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsaga <45262877+saga-00@users.noreply.github.com>2024-05-29 04:49:44 -0300
committerGitHub <noreply@github.com>2024-05-29 09:49:44 +0200
commit8fcc5125090660daccb30c34f5d15b44e97ae304 (patch)
treedcd8e9705d7fa52f3849cf10c7dad9d7329661cd
parent8ce2c5c720a69380816484805d971f919f2d0c59 (diff)
downloadskyhanni-8fcc5125090660daccb30c34f5d15b44e97ae304.tar.gz
skyhanni-8fcc5125090660daccb30c34f5d15b44e97ae304.tar.bz2
skyhanni-8fcc5125090660daccb30c34f5d15b44e97ae304.zip
Feature: Croesus Limit (#1908)
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/dungeon/DungeonChestConfig.java6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/CroesusChestTracker.kt4
2 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/DungeonChestConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/DungeonChestConfig.java
index 2c3d973cf..b71e628b4 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/DungeonChestConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/DungeonChestConfig.java
@@ -19,4 +19,10 @@ public class DungeonChestConfig {
@ConfigEditorBoolean
@FeatureToggle
public boolean kismetStackSize = true;
+
+ @Expose
+ @ConfigOption(name = "Croesus Limit Warning", desc = "Gives a warning when you are close to being past Croesus limit.")
+ @ConfigEditorBoolean
+ @FeatureToggle
+ public boolean croesusLimit = true;
}
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 fa297d6fa..d87e02796 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/CroesusChestTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/CroesusChestTracker.kt
@@ -230,6 +230,10 @@ class CroesusChestTracker {
if ((croesusChests?.size ?: 0) > maxChests) {
croesusChests?.dropLast(1)
}
+
+ if (config.croesusLimit && getLastActiveChest() >= 55) {
+ ChatUtils.chat("You are close to the Croesus Limit. Please open your chests!")
+ }
}
private fun Int.getRun() = getRun0(this)