aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorSeRaid <77941535+SeRaid743@users.noreply.github.com>2024-04-28 22:34:32 +1200
committerGitHub <noreply@github.com>2024-04-28 12:34:32 +0200
commit41a7fbbf0fee07956aabd620d1c8a29966b4f27a (patch)
treeda314cfb6d0b1c0ff6677303ec3d68f1ea86c1bb /src/main
parentbdf81bc1386f5cd7d4b0bb14c571123744e78b41 (diff)
downloadskyhanni-41a7fbbf0fee07956aabd620d1c8a29966b4f27a.tar.gz
skyhanni-41a7fbbf0fee07956aabd620d1c8a29966b4f27a.tar.bz2
skyhanni-41a7fbbf0fee07956aabd620d1c8a29966b4f27a.zip
made it possible to disable rabbit crush warning (#1575)
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/event/ChocolateFactoryConfig.java2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/ChocolateFactoryBarnManager.kt5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/ChocolateFactoryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/event/ChocolateFactoryConfig.java
index 669184a9e..344ee625e 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/event/ChocolateFactoryConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/event/ChocolateFactoryConfig.java
@@ -81,7 +81,7 @@ public class ChocolateFactoryConfig {
name = "Rabbit Crush Threshold",
desc = "How close should you be to your barn capacity should you be before being warned about needing to upgrade it."
)
- @ConfigEditorSlider(minValue = 3, maxValue = 20, minStep = 1)
+ @ConfigEditorSlider(minValue = 0, maxValue = 20, minStep = 1)
public int barnCapacityThreshold = 6;
@Expose
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/ChocolateFactoryBarnManager.kt b/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/ChocolateFactoryBarnManager.kt
index e403415d2..43c276293 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/ChocolateFactoryBarnManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/ChocolateFactoryBarnManager.kt
@@ -45,6 +45,11 @@ object ChocolateFactoryBarnManager {
fun trySendBarnFullMessage() {
if (!ChocolateFactoryAPI.isEnabled()) return
+
+ if (config.barnCapacityThreshold <= 0) {
+ return
+ }
+
val profileStorage = profileStorage ?: return
val remainingSpace = profileStorage.maxRabbits - profileStorage.currentRabbits