aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/config
diff options
context:
space:
mode:
authorEmpa <42304516+ItsEmpa@users.noreply.github.com>2024-04-12 14:27:44 +0200
committerGitHub <noreply@github.com>2024-04-12 14:27:44 +0200
commitd07088973b3662cfa70407a33a2ca9855605837e (patch)
tree12f9841637985a6f60fb6a26bb0f7106e5d5041a /src/main/java/at/hannibal2/skyhanni/config
parent388819e61cf1229ef4a5d6ddeca1bd1dafd05e71 (diff)
downloadskyhanni-d07088973b3662cfa70407a33a2ca9855605837e.tar.gz
skyhanni-d07088973b3662cfa70407a33a2ca9855605837e.tar.bz2
skyhanni-d07088973b3662cfa70407a33a2ca9855605837e.zip
Fix + Improvement: No Bits Warning (#1425)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/config')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java11
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/misc/NoBitsWarningConfig.java19
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/storage/ProfileSpecificStorage.java2
4 files changed, 26 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt
index 1e768df6e..7907c0f37 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt
+++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt
@@ -11,7 +11,7 @@ import com.google.gson.JsonPrimitive
object ConfigUpdaterMigrator {
val logger = LorenzLogger("ConfigMigration")
- const val CONFIG_VERSION = 34
+ const val CONFIG_VERSION = 35
fun JsonElement.at(chain: List<String>, init: Boolean): JsonElement? {
if (chain.isEmpty()) return this
if (this !is JsonObject) return null
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java
index 785499f3e..f4e5fd032 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java
@@ -93,6 +93,11 @@ public class MiscConfig {
public PetCandyDisplayConfig petCandy = new PetCandyDisplayConfig();
@Expose
+ @ConfigOption(name = "No Bits Warning", desc = "")
+ @Accordion
+ public NoBitsWarningConfig noBitsWarning = new NoBitsWarningConfig();
+
+ @Expose
@ConfigOption(name = "Show Outside SB", desc = "Show these features outside of SkyBlock.")
@ConfigEditorDraggableList
public List<OutsideSbFeature> showOutsideSB = new ArrayList<>();
@@ -132,12 +137,6 @@ public class MiscConfig {
public boolean colorMonthNames = false;
@Expose
- @ConfigOption(name = "No Bits Warning", desc = "Alerts you when you have no bits available.")
- @ConfigEditorBoolean
- @FeatureToggle
- public boolean noBitsWarning = true;
-
- @Expose
@ConfigOption(name = "Explosions Hider", desc = "Hide explosions.")
@ConfigEditorBoolean
@FeatureToggle
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/NoBitsWarningConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/NoBitsWarningConfig.java
new file mode 100644
index 000000000..2542d7728
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/NoBitsWarningConfig.java
@@ -0,0 +1,19 @@
+package at.hannibal2.skyhanni.config.features.misc;
+
+import at.hannibal2.skyhanni.config.FeatureToggle;
+import com.google.gson.annotations.Expose;
+import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean;
+import io.github.notenoughupdates.moulconfig.annotations.ConfigOption;
+
+public class NoBitsWarningConfig {
+ @Expose
+ @ConfigOption(name = "Enabled", desc = "Alerts you when you have no bits available.")
+ @ConfigEditorBoolean
+ @FeatureToggle
+ public boolean enabled = true;
+
+ @Expose
+ @ConfigOption(name = "Notification Sound", desc = "Plays a notification sound when you get a warning.")
+ @ConfigEditorBoolean
+ public boolean notificationSound = true;
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/config/storage/ProfileSpecificStorage.java b/src/main/java/at/hannibal2/skyhanni/config/storage/ProfileSpecificStorage.java
index 1a2d98223..f10d3d01c 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/storage/ProfileSpecificStorage.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/storage/ProfileSpecificStorage.java
@@ -80,7 +80,7 @@ public class ProfileSpecificStorage {
public int bits = -1;
@Expose
- public int bitsToClaim = -1;
+ public int bitsAvailable = -1;
@Expose
public Long boosterCookieExpiryTime = null;