diff options
author | Walker Selby <git@walkerselby.com> | 2023-12-11 13:34:53 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-11 22:34:53 +0100 |
commit | b8ec689ce9bd6fe89e4b825a988edb63fb51b5ab (patch) | |
tree | 08cc781633a232ba5b4b3c403028ad6b40f17e8e /src/main/java/at/hannibal2/skyhanni/features/garden | |
parent | 8f3f2318352a2b24625566751daefd1c5e71e51a (diff) | |
download | skyhanni-b8ec689ce9bd6fe89e4b825a988edb63fb51b5ab.tar.gz skyhanni-b8ec689ce9bd6fe89e4b825a988edb63fb51b5ab.tar.bz2 skyhanni-b8ec689ce9bd6fe89e4b825a988edb63fb51b5ab.zip |
Internal Changes: Add Config Transform function (#769)
Added Config Transform function. #769
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/garden')
4 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt index 937a94a45..e46b9e56e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt @@ -441,7 +441,7 @@ object CropMoneyDisplay { event.move(3, "garden.moneyPerHourDicer", "garden.moneyPerHours.dicer") event.move(3, "garden.moneyPerHourHideTitle", "garden.moneyPerHours.hideTitle") event.move(3, "garden.moneyPerHourPos", "garden.moneyPerHours.pos") - event.move(11, "garden.moneyPerHours.customFormat") { element -> + event.transform(11, "garden.moneyPerHours.customFormat") { element -> ConfigUtils.migrateIntArrayListToEnumArrayList(element, CustomFormatEntry::class.java) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt index 3ba3ad59f..adb30a5cd 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt @@ -74,7 +74,7 @@ class FarmingWeightDisplay { @SubscribeEvent fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { - event.move(1, "garden.eliteFarmingWeightoffScreenDropMessage", "garden.eliteFarmingWeightOffScreenDropMessage") + event.transform(1, "garden.eliteFarmingWeightoffScreenDropMessage") event.move(3, "garden.eliteFarmingWeightDisplay", "garden.eliteFarmingWeights.display") event.move(3, "garden.eliteFarmingWeightPos", "garden.eliteFarmingWeights.pos") event.move(3, "garden.eliteFarmingWeightLeaderboard", "garden.eliteFarmingWeights.leaderboard") diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt index 59db979be..35f53038d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt @@ -247,7 +247,7 @@ object GardenVisitorDropStatistics { event.move(3, "${originalPrefix}onlyOnBarn", "${newPrefix}onlyOnBarn") event.move(3, "${originalPrefix}visitorDropPos", "${newPrefix}pos") - event.move(11, "${newPrefix}textFormat", "${newPrefix}textFormat") { element -> + event.transform(11, "${newPrefix}textFormat") { element -> ConfigUtils.migrateIntArrayListToEnumArrayList(element, DropsStatisticsTextEntry::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 22a53c388..6e24bee4b 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 @@ -607,10 +607,10 @@ class GardenVisitorFeatures { event.move(3, "garden.visitorColoredName", "garden.visitors.coloredName") event.move(3, "garden.visitorHypixelArrivedMessage", "garden.visitors.hypixelArrivedMessage") event.move(3, "garden.visitorHideChat", "garden.visitors.hideChat") - event.move(11, "garden.visitors.rewardWarning.drops", "garden.visitors.rewardWarning.drops") { element -> + event.transform(11, "garden.visitors.rewardWarning.drops") { element -> ConfigUtils.migrateIntArrayListToEnumArrayList(element, VisitorReward::class.java) } - event.move(12, "garden.visitors.rewardWarning.drops", "garden.visitors.rewardWarning.drops") { element -> + event.transform(12, "garden.visitors.rewardWarning.drops") { element -> val drops = JsonArray() for (jsonElement in element.asJsonArray) { val old = jsonElement.asString |