aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-04-30 14:03:06 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-04-30 14:03:06 +0200
commit46d9ae9064003bc528e9d85e28a0f26d6447d4b1 (patch)
tree088e4282411272f32f7cb470e0d3200003195aea /src/main
parent7e53edf62b215b8d1ba260c7a29f0596a314835a (diff)
downloadskyhanni-46d9ae9064003bc528e9d85e28a0f26d6447d4b1.tar.gz
skyhanni-46d9ae9064003bc528e9d85e28a0f26d6447d4b1.tar.bz2
skyhanni-46d9ae9064003bc528e9d85e28a0f26d6447d4b1.zip
remove function
Diffstat (limited to 'src/main')
-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 ->