aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/mining
diff options
context:
space:
mode:
authorWalker Selby <git@walkerselby.com>2023-12-11 13:34:53 -0800
committerGitHub <noreply@github.com>2023-12-11 22:34:53 +0100
commitb8ec689ce9bd6fe89e4b825a988edb63fb51b5ab (patch)
tree08cc781633a232ba5b4b3c403028ad6b40f17e8e /src/main/java/at/hannibal2/skyhanni/features/mining
parent8f3f2318352a2b24625566751daefd1c5e71e51a (diff)
downloadskyhanni-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/mining')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt
index 63ae5763e..ce5a8dd48 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt
@@ -174,11 +174,8 @@ object PowderTracker {
@SubscribeEvent
fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) {
event.move(2, "misc.powderTrackerConfig", "mining.powderTracker")
-
- event.move(8, "#profile.powderTracker", "#profile.powderTracker") { old ->
- old.asJsonObject.get("0")
- }
- event.move(11, "mining.powderTracker.textFormat", "mining.powderTracker.textFormat") { element ->
+ event.transform(8, "#profile.powderTracker") { old -> old.asJsonObject.get("0") }
+ event.transform(11, "mining.powderTracker.textFormat") { element ->
ConfigUtils.migrateIntArrayListToEnumArrayList(element, PowderDisplayEntry::class.java)
}
}