From 46411b35835df6a1f5a594c869940ba2fe1d8d28 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 11 Dec 2023 23:29:57 +0100 Subject: fixed config version --- .../java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt | 2 +- .../java/at/hannibal2/skyhanni/features/chroma/ChromaShader.kt | 2 +- .../java/at/hannibal2/skyhanni/features/combat/BestiaryData.kt | 5 +++-- .../features/combat/damageindicator/DamageIndicatorManager.kt | 3 ++- .../skyhanni/features/fishing/trophy/TrophyFishMessages.kt | 3 ++- .../hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt | 3 ++- .../at/hannibal2/skyhanni/features/garden/ToolTooltipTweaks.kt | 3 ++- .../skyhanni/features/garden/composter/ComposterOverlay.kt | 5 +++-- .../skyhanni/features/garden/farming/GardenBestCropTime.kt | 3 ++- .../java/at/hannibal2/skyhanni/features/garden/pests/PestSpawn.kt | 2 +- .../skyhanni/features/garden/visitor/GardenVisitorFeatures.kt | 3 ++- .../java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt | 4 ++-- .../java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt | 8 ++++---- .../skyhanni/features/itemabilities/FireVeilWandParticles.kt | 3 ++- src/main/java/at/hannibal2/skyhanni/features/misc/HideArmor.kt | 2 +- .../java/at/hannibal2/skyhanni/features/misc/PlayerChatSymbols.kt | 2 +- .../skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt | 2 +- .../nether/reputationhelper/CrimsonIsleReputationHelper.kt | 3 ++- .../features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt | 2 +- .../skyhanni/features/slayer/blaze/BlazeSlayerDaggerHelper.kt | 3 ++- .../java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt | 2 +- 21 files changed, 38 insertions(+), 27 deletions(-) (limited to 'src/main/java/at/hannibal2') diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt index da558b77f..649f103f9 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt @@ -9,7 +9,7 @@ import com.google.gson.JsonPrimitive object ConfigUpdaterMigrator { val logger = LorenzLogger("ConfigMigration") - const val CONFIG_VERSION = 14 + const val CONFIG_VERSION = 15 fun JsonElement.at(chain: List, init: Boolean): JsonElement? { if (chain.isEmpty()) return this if (this !is JsonObject) return null diff --git a/src/main/java/at/hannibal2/skyhanni/features/chroma/ChromaShader.kt b/src/main/java/at/hannibal2/skyhanni/features/chroma/ChromaShader.kt index dfa187c0d..e265d6525 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chroma/ChromaShader.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chroma/ChromaShader.kt @@ -53,7 +53,7 @@ object ChromaShader : Shader("chroma", "chroma") { @SubscribeEvent fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { - event.transform(14, "config.chromaDirection") { element -> + event.transform(15, "config.chromaDirection") { element -> ConfigUtils.migrateIntToEnum(element, Direction::class.java) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/BestiaryData.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/BestiaryData.kt index b7d3718c7..b269e1df2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/BestiaryData.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/BestiaryData.kt @@ -103,10 +103,11 @@ object BestiaryData { @SubscribeEvent fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { event.move(2, "misc.bestiaryData", "combat.bestiary") - event.transform(14, "combat.bestiary.numberFormat") { element -> + + event.transform(15, "combat.bestiary.numberFormat") { element -> ConfigUtils.migrateIntToEnum(element, NumberFormatEntry::class.java) } - event.transform(14, "combat.bestiary.displayType") { element -> + event.transform(15, "combat.bestiary.displayType") { element -> ConfigUtils.migrateIntToEnum(element, DisplayTypeEntry::class.java) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt index 6228ff5aa..d2fff4d7b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt @@ -876,7 +876,8 @@ class DamageIndicatorManager { event.transform(11, "combat.damageIndicator.bossesToShow") { element -> ConfigUtils.migrateIntArrayListToEnumArrayList(element, BossCategory::class.java) } - event.transform(14, "combat.damageIndicator.bossName") { element -> + + event.transform(15, "combat.damageIndicator.bossName") { element -> ConfigUtils.migrateIntToEnum(element, NameVisibility::class.java) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishMessages.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishMessages.kt index cd3af1f77..ed394e20a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishMessages.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishMessages.kt @@ -86,7 +86,8 @@ class TrophyFishMessages { event.move(2, "fishing.trophyFishDuplicateHider", "fishing.trophyFishing.chatMessages.duplicateHider") event.move(2, "fishing.trophyFishBronzeHider", "fishing.trophyFishing.chatMessages.bronzeHider") event.move(2, "fishing.trophyFishSilverHider", "fishing.trophyFishing.chatMessages.silverHider") - event.transform(14, "fishing.trophyFishing.chatMessages.design") { element -> + + event.transform(15, "fishing.trophyFishing.chatMessages.design") { element -> ConfigUtils.migrateIntToEnum(element, DesignFormat::class.java) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt index 8faf2a5b6..5097e4366 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt @@ -567,7 +567,8 @@ object GardenNextJacobContest { event.move(3, "garden.nextJacobContestWarnTime", "garden.nextJacobContests.warnTime") event.move(3, "garden.nextJacobContestWarnPopup", "garden.nextJacobContests.warnPopup") event.move(3, "garden.nextJacobContestPos", "garden.nextJacobContests.pos") - event.transform(14, "garden.nextJacobContests.shareAutomatically") { element -> + + event.transform(15, "garden.nextJacobContests.shareAutomatically") { element -> ConfigUtils.migrateIntToEnum(element, ShareContestsEntry::class.java) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/ToolTooltipTweaks.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/ToolTooltipTweaks.kt index 186f3d34f..ffd83126f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/ToolTooltipTweaks.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/ToolTooltipTweaks.kt @@ -160,7 +160,8 @@ class ToolTooltipTweaks { event.move(3, "garden.compactToolTooltips", "garden.tooltipTweak.compactToolTooltips") event.move(3, "garden.fortuneTooltipKeybind", "garden.tooltipTweak.fortuneTooltipKeybind") event.move(3, "garden.cropTooltipFortune", "garden.tooltipTweak.cropTooltipFortune") - event.transform(14, "garden.tooltipTweak.cropTooltipFortune") { element -> + + event.transform(15, "garden.tooltipTweak.cropTooltipFortune") { element -> ConfigUtils.migrateIntToEnum(element, CropTooltipFortuneEntry::class.java) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt index 9e6e83d1f..84b7d35e4 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt @@ -582,10 +582,11 @@ object ComposterOverlay { event.move(3, "garden.composterOverlayOrganicMatterPos", "garden.composters.overlayOrganicMatterPos") event.move(3, "garden.composterOverlayFuelExtrasPos", "garden.composters.overlayFuelExtrasPos") event.move(3, "garden.composterRoundDown", "garden.composters.roundDown") - event.transform(14, "garden.composters.overlayPriceType") { element -> + + event.transform(15, "garden.composters.overlayPriceType") { element -> ConfigUtils.migrateIntToEnum(element, OverlayPriceTypeEntry::class.java) } - event.transform(14, "garden.composters.retrieveFrom") { element -> + event.transform(15, "garden.composters.retrieveFrom") { element -> ConfigUtils.migrateIntToEnum(element, RetrieveFromEntry::class.java) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenBestCropTime.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenBestCropTime.kt index 2072010c9..32dfd7759 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenBestCropTime.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenBestCropTime.kt @@ -139,7 +139,8 @@ class GardenBestCropTime { event.move(3, "garden.cropMilestoneShowCurrent", "garden.cropMilestones.next.showCurrent") event.move(3, "garden.cropMilestoneBestCompact", "garden.cropMilestones.next.bestCompact") event.move(3, "garden.cropMilestoneBestHideTitle", "garden.cropMilestones.next.bestHideTitle") - event.transform(14, "garden.cropMilestones.next.bestType") { element -> + + event.transform(15, "garden.cropMilestones.next.bestType") { element -> ConfigUtils.migrateIntToEnum(element, BestTypeEntry::class.java) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestSpawn.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestSpawn.kt index 6a411e064..c48a77c9c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestSpawn.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestSpawn.kt @@ -61,7 +61,7 @@ class PestSpawn { @SubscribeEvent fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { - event.transform(14, "garden.pests.pestSpawn.chatMessageFormat") { element -> + event.transform(15, "garden.pests.pestSpawn.chatMessageFormat") { element -> ConfigUtils.migrateIntToEnum(element, ChatMessageFormatEntry::class.java) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt index 86aad2468..4dcd2684d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt @@ -625,7 +625,8 @@ class GardenVisitorFeatures { drops } - event.transform(14, "garden.visitors.highlightStatus") { element -> + + event.transform(15, "garden.visitors.highlightStatus") { element -> ConfigUtils.migrateIntToEnum(element, HighlightMode::class.java) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt index 1ff5ec828..ca3ab6f21 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt @@ -292,10 +292,10 @@ class ChestValue { @SubscribeEvent fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { - event.transform(14, "inventory.chestValueConfig.numberFormat") { element -> + event.transform(15, "inventory.chestValueConfig.numberFormat") { element -> ConfigUtils.migrateIntToEnum(element, NumberFormatEntry::class.java) } - event.transform(14, "inventory.chestValueConfig.sortingType") { element -> + event.transform(15, "inventory.chestValueConfig.sortingType") { element -> ConfigUtils.migrateIntToEnum(element, SortingTypeEntry::class.java) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt index 49cc14c15..510b62dd1 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt @@ -245,16 +245,16 @@ object SackDisplay { @SubscribeEvent fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { - event.transform(14, "inventory.sackDisplay.numberFormat") { element -> + event.transform(15, "inventory.sackDisplay.numberFormat") { element -> ConfigUtils.migrateIntToEnum(element, NumberFormatEntry::class.java) } - event.transform(14, "inventory.sackDisplay.priceFormat") { element -> + event.transform(15, "inventory.sackDisplay.priceFormat") { element -> ConfigUtils.migrateIntToEnum(element, PriceFormatEntry::class.java) } - event.transform(14, "inventory.sackDisplay.priceFrom") { element -> + event.transform(15, "inventory.sackDisplay.priceFrom") { element -> ConfigUtils.migrateIntToEnum(element, SackDisplayConfig.PriceFrom::class.java) } - event.transform(14, "inventory.sackDisplay.sortingType") { element -> + event.transform(15, "inventory.sackDisplay.sortingType") { element -> ConfigUtils.migrateIntToEnum(element, SortingTypeEntry::class.java) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt index fdce2da62..9154df2e5 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt @@ -62,7 +62,8 @@ class FireVeilWandParticles { fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { event.move(3, "itemAbilities.fireVeilWandDisplayColor", "itemAbilities.fireVeilWands.displayColor") event.move(3, "itemAbilities.fireVeilWandDisplay", "itemAbilities.fireVeilWands.display") - event.transform(14, "itemAbilities.fireVeilWands.display") { element -> + + event.transform(15, "itemAbilities.fireVeilWands.display") { element -> ConfigUtils.migrateIntToEnum(element, DisplayEntry::class.java) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/HideArmor.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/HideArmor.kt index e3e6d62b3..c4a5be8ed 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/HideArmor.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/HideArmor.kt @@ -67,7 +67,7 @@ class HideArmor { @SubscribeEvent fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { - event.transform(14, "misc.hideArmor2.mode") { element -> + event.transform(15, "misc.hideArmor2.mode") { element -> ConfigUtils.migrateIntToEnum(element, ModeEntry::class.java) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/PlayerChatSymbols.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/PlayerChatSymbols.kt index a406ce169..231eeb3c3 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/PlayerChatSymbols.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/PlayerChatSymbols.kt @@ -90,7 +90,7 @@ class PlayerChatSymbols { @SubscribeEvent fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { - event.transform(14, "chat.chatSymbols.symbolLocation") { element -> + event.transform(15, "chat.chatSymbols.symbolLocation") { element -> ConfigUtils.migrateIntToEnum(element, SymbolLocationEntry::class.java) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt index d4dc00449..86b0be8dd 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt @@ -249,7 +249,7 @@ object AdvancedPlayerList { @SubscribeEvent fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { - event.transform(14, "misc.compactTabList.advancedPlayerList.playerSortOrder") { element -> + event.transform(15, "misc.compactTabList.advancedPlayerList.playerSortOrder") { element -> ConfigUtils.migrateIntToEnum(element, PlayerSortEntry::class.java) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt index 0afcba7cf..f7dce6b2e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt @@ -132,7 +132,8 @@ class CrimsonIsleReputationHelper(skyHanniMod: SkyHanniMod) { event.move(2, "misc.reputationHelperHotkey", "crimsonIsle.reputationHelper.hotkey") event.move(2, "misc.crimsonIsleReputationHelperPos", "crimsonIsle.reputationHelper.position") event.move(2, "misc.crimsonIsleReputationShowLocation", "crimsonIsle.reputationHelper.showLocation") - event.transform(14, "crimsonIsle.reputationHelper.showLocation") { element -> + + event.transform(15, "crimsonIsle.reputationHelper.showLocation") { element -> ConfigUtils.migrateIntToEnum(element, ShowLocationEntry::class.java) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt index 867e88dcd..caca2b283 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt @@ -197,7 +197,7 @@ class ShowMotesNpcSellPrice { @SubscribeEvent fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { - event.transform(14, "rift.motes.inventoryValue.formatType") { element -> + event.transform(15, "rift.motes.inventoryValue.formatType") { element -> ConfigUtils.migrateIntToEnum(element, NumberFormatEntry::class.java) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerDaggerHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerDaggerHelper.kt index 73076a932..5d0a4f178 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerDaggerHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerDaggerHelper.kt @@ -251,7 +251,8 @@ class BlazeSlayerDaggerHelper { event.move(3, "slayer.blazeMarkRightHellionShield", "slayer.blazes.hellion.markRightHellionShield") event.move(3, "slayer.blazeFirstDagger", "slayer.blazes.hellion.firstDagger") event.move(3, "slayer.blazeHideDaggerWarning", "slayer.blazes.hellion.hideDaggerWarning") - event.transform(14, "slayer.blazes.hellion.firstDagger") { element -> + + event.transform(15, "slayer.blazes.hellion.firstDagger") { element -> ConfigUtils.migrateIntToEnum(element, FirstDaggerEntry::class.java) } } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt index 80202fab0..02ce5129a 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt @@ -179,7 +179,7 @@ open class SkyHanniTracker( @SubscribeEvent fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { - event.transform(14, "misc.tracker.priceFrom") { element -> + event.transform(15, "misc.tracker.priceFrom") { element -> ConfigUtils.migrateIntToEnum(element, PriceFromEntry::class.java) } } -- cgit