aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/ChocolateFactoryStats.kt8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/ChocolateFactoryStats.kt b/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/ChocolateFactoryStats.kt
index 420c3b4a6..e1129a82d 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/ChocolateFactoryStats.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/ChocolateFactoryStats.kt
@@ -51,7 +51,7 @@ object ChocolateFactoryStats {
val prestigeEstimate = ChocolateAmount.PRESTIGE.formattedTimeUntilGoal(ChocolateFactoryAPI.chocolateForPrestige)
- val text = formatList(buildMap {
+ val map = buildMap {
put(ChocolateFactoryStat.HEADER, "§6§lChocolate Factory Stats")
put(ChocolateFactoryStat.CURRENT, "§eCurrent Chocolate: §6${ChocolateAmount.CURRENT.formatted}")
@@ -78,7 +78,8 @@ object ChocolateFactoryStats {
ChocolateFactoryStat.RAW_PER_SECOND,
"§eRaw Per Second: §6${profileStorage.rawChocPerSecond.addSeparators()}"
)
- })
+ }
+ val text = config.statsDisplayList.mapNotNull { map[it] }
display = listOf(Renderable.clickAndHover(
Renderable.verticalContainer(text.map(Renderable::string)),
@@ -96,9 +97,6 @@ object ChocolateFactoryStats {
))
}
- private fun formatList(list: Map<ChocolateFactoryStat, String>): List<String> =
- config.statsDisplayList.mapNotNull { list[it] }
-
@SubscribeEvent
fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) {
event.transform(42, "event.chocolateFactory.statsDisplayList") { element ->