diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-02-16 11:14:58 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-02-16 11:14:58 +0100 |
commit | 26fe548fa9a5cfe29b130a0a5585278df3429ee9 (patch) | |
tree | a367c3d5799d1e54932a072fb43b63aa10158d72 /src | |
parent | 40745b8f209d16a9adbc0a21931d5f466c92c646 (diff) | |
download | skyhanni-26fe548fa9a5cfe29b130a0a5585278df3429ee9.tar.gz skyhanni-26fe548fa9a5cfe29b130a0a5585278df3429ee9.tar.bz2 skyhanni-26fe548fa9a5cfe29b130a0a5585278df3429ee9.zip |
Moving Sulphur Skitter Box from Crimson Isle to Fishing -> Trophy Fishing.
Diffstat (limited to 'src')
4 files changed, 15 insertions, 7 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt index 64a158d10..f779fb282 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt @@ -10,7 +10,7 @@ import com.google.gson.JsonPrimitive object ConfigUpdaterMigrator { val logger = LorenzLogger("ConfigMigration") - const val CONFIG_VERSION = 23 + const val CONFIG_VERSION = 24 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/crimsonisle/CrimsonIsleConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/CrimsonIsleConfig.java index 995d61528..968c551cf 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/CrimsonIsleConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/CrimsonIsleConfig.java @@ -20,11 +20,6 @@ public class CrimsonIsleConfig { @Expose public ReputationHelperConfig reputationHelper = new ReputationHelperConfig(); - @ConfigOption(name = "Sulphur Skitter Box", desc = "") - @Accordion - @Expose - public SulphurSkitterBoxConfig sulphurSkitterBoxConfig = new SulphurSkitterBoxConfig(); - @Expose @ConfigOption(name = "Pablo NPC Helper", desc = "Shows a clickable message that grabs the flower needed from your sacks.") @ConfigEditorBoolean diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/fishing/trophyfishing/TrophyFishingConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/trophyfishing/TrophyFishingConfig.java index 1b180efc9..2b5195797 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/fishing/trophyfishing/TrophyFishingConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/trophyfishing/TrophyFishingConfig.java @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.config.features.fishing.trophyfishing; import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.features.crimsonisle.SulphurSkitterBoxConfig; import com.google.gson.annotations.Expose; import io.github.moulberry.moulconfig.annotations.Accordion; import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; @@ -18,6 +19,11 @@ public class TrophyFishingConfig { @Accordion public GeyserFishingConfig geyserOptions = new GeyserFishingConfig(); + @ConfigOption(name = "Sulphur Skitter Box", desc = "") + @Accordion + @Expose + public SulphurSkitterBoxConfig sulphurSkitterBox = new SulphurSkitterBoxConfig(); + @Expose @ConfigOption(name = "Fillet Tooltip", desc = "Show fillet value of Trophy Fish in tooltip.") @ConfigEditorBoolean diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/SulphurSkitterBox.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/SulphurSkitterBox.kt index 6ffabfa0e..5db95b246 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/SulphurSkitterBox.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/SulphurSkitterBox.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.features.nether import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.config.features.crimsonisle.SulphurSkitterBoxConfig import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.jsonobjects.repo.ItemsJson @@ -27,7 +28,7 @@ import java.awt.Color class SulphurSkitterBox { - private val config get() = SkyHanniMod.feature.crimsonIsle.sulphurSkitterBoxConfig + private val config get() = SkyHanniMod.feature.fishing.trophyFishing.sulphurSkitterBox private var rods = listOf<NEUInternalName>() private var spongeBlocks = listOf<BlockPos>() private var closestBlock: BlockPos? = null @@ -113,4 +114,10 @@ class SulphurSkitterBox { fun isEnabled() = IslandType.CRIMSON_ISLE.isInIsland() && config.enabled && (!config.onlyWithRods || InventoryUtils.itemInHandId in rods) + + + @SubscribeEvent + fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { + event.move(24, "crimsonIsle.sulphurSkitterBoxConfig", "fishing.trophyFishing.sulphurSkitterBox") + } } |