diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-09-16 13:20:59 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-09-16 13:20:59 +0200 |
commit | b155103abb08a9d54d91cc1d141bce8994f69a89 (patch) | |
tree | a7510777c4c4c51acdeacd1b3f0b48079f1f3e71 /src/main/java/at/hannibal2/skyhanni/config | |
parent | 83b5cd3c93bab32f16365c6b6810362f4de5598e (diff) | |
download | skyhanni-b155103abb08a9d54d91cc1d141bce8994f69a89.tar.gz skyhanni-b155103abb08a9d54d91cc1d141bce8994f69a89.tar.bz2 skyhanni-b155103abb08a9d54d91cc1d141bce8994f69a89.zip |
use config migration on ashfang gravity orbs
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/config')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt | 2 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/AshfangConfig.java | 25 |
2 files changed, 18 insertions, 9 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt index 6b590a389..b0446f62e 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt @@ -8,7 +8,7 @@ import com.google.gson.JsonPrimitive object ConfigUpdaterMigrator { val logger = LorenzLogger("ConfigMigration") - val configVersion = 0 + val configVersion = 1 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/AshfangConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/AshfangConfig.java index 9cffc4ed8..a79bb1d03 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/AshfangConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/AshfangConfig.java @@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.config.features; import at.hannibal2.skyhanni.config.FeatureToggle; import at.hannibal2.skyhanni.config.core.config.Position; import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; import io.github.moulberry.moulconfig.annotations.ConfigOption; @@ -27,16 +28,24 @@ public class AshfangConfig { @Expose public Position nextResetCooldownPos = new Position(10, 10, false, true); + @ConfigOption(name = "Gravity Orbs", desc = "") + @Accordion @Expose - @ConfigOption(name = "Gravity Orbs", desc = "Shows the Gravity Orbs more clearly.") - @ConfigEditorBoolean - @FeatureToggle - public boolean gravityOrbs = false; + public GravityOrbsConfig gravityOrbs = new GravityOrbsConfig(); - @Expose - @ConfigOption(name = "Orbs Color", desc = "Color of the Ashfang Gravity Orbs.") - @ConfigEditorColour - public String gravityOrbsColor = "0:120:255:85:85"; + public static class GravityOrbsConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Shows the Gravity Orbs more clearly.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Color", desc = "Color of the Gravity Orbs.") + @ConfigEditorColour + public String color = "0:120:255:85:85"; + } @Expose @ConfigOption(name = "Blazing Souls", desc = "Shows the Blazing Souls more clearly.") |