diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-04-30 14:01:06 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-04-30 14:01:06 +0200 |
commit | 7e53edf62b215b8d1ba260c7a29f0596a314835a (patch) | |
tree | 5fd62b9d3ad483f0a7bb075d35032a78b5f3e756 /src/main/java | |
parent | d595c90008c81adbbb7e072f31543416b263906b (diff) | |
download | skyhanni-7e53edf62b215b8d1ba260c7a29f0596a314835a.tar.gz skyhanni-7e53edf62b215b8d1ba260c7a29f0596a314835a.tar.bz2 skyhanni-7e53edf62b215b8d1ba260c7a29f0596a314835a.zip |
remove ordinal
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/ChocolateFactoryStats.kt | 47 |
1 files changed, 23 insertions, 24 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 a621059b0..420c3b4a6 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,30 +51,33 @@ object ChocolateFactoryStats { val prestigeEstimate = ChocolateAmount.PRESTIGE.formattedTimeUntilGoal(ChocolateFactoryAPI.chocolateForPrestige) - val text = formatList(buildList { - add("§6§lChocolate Factory Stats") + val text = formatList(buildMap { + put(ChocolateFactoryStat.HEADER, "§6§lChocolate Factory Stats") - add("§eCurrent Chocolate: §6${ChocolateAmount.CURRENT.formatted}") - add("§eThis Prestige: §6${ChocolateAmount.PRESTIGE.formatted}") - add("§eAll-time: §6${ChocolateAmount.ALL_TIME.formatted}") + put(ChocolateFactoryStat.CURRENT, "§eCurrent Chocolate: §6${ChocolateAmount.CURRENT.formatted}") + put(ChocolateFactoryStat.THIS_PRESTIGE, "§eThis Prestige: §6${ChocolateAmount.PRESTIGE.formatted}") + put(ChocolateFactoryStat.ALL_TIME, "§eAll-time: §6${ChocolateAmount.ALL_TIME.formatted}") - add("§ePer Second: §6${perSecond.addSeparators()}") - add("§ePer Minute: §6${perMinute.addSeparators()}") - add("§ePer Hour: §6${perHour.addSeparators()}") - add("§ePer Day: §6${perDay.addSeparators()}") + put(ChocolateFactoryStat.PER_SECOND, "§ePer Second: §6${perSecond.addSeparators()}") + put(ChocolateFactoryStat.PER_MINUTE, "§ePer Minute: §6${perMinute.addSeparators()}") + put(ChocolateFactoryStat.PER_HOUR, "§ePer Hour: §6${perHour.addSeparators()}") + put(ChocolateFactoryStat.PER_DAY, "§ePer Day: §6${perDay.addSeparators()}") - add("§eChocolate Multiplier: §6${profileStorage.chocolateMultiplier}") - add("§eBarn: §6${ChocolateFactoryBarnManager.barnStatus()}") + put(ChocolateFactoryStat.MULTIPLIER, "§eChocolate Multiplier: §6${profileStorage.chocolateMultiplier}") + put(ChocolateFactoryStat.BARN, "§eBarn: §6${ChocolateFactoryBarnManager.barnStatus()}") - add("§ePosition: §7#§b$position $percentile") + put(ChocolateFactoryStat.LEADERBOARD_POS, "§ePosition: §7#§b$position $percentile") - add("") - add("") - add("") + put(ChocolateFactoryStat.EMPTY, "") + put(ChocolateFactoryStat.EMPTY_2, "") + put(ChocolateFactoryStat.EMPTY_3, "") - add("§eTime Tower: §6$timeTowerInfo") - add("§eTime To Prestige: $prestigeEstimate") - add("§eRaw Per Second: §6${profileStorage.rawChocPerSecond.addSeparators()}") + put(ChocolateFactoryStat.TIME_TOWER, "§eTime Tower: §6$timeTowerInfo") + put(ChocolateFactoryStat.TIME_TO_PRESTIGE, "§eTime To Prestige: $prestigeEstimate") + put( + ChocolateFactoryStat.RAW_PER_SECOND, + "§eRaw Per Second: §6${profileStorage.rawChocPerSecond.addSeparators()}" + ) }) display = listOf(Renderable.clickAndHover( @@ -93,12 +96,8 @@ object ChocolateFactoryStats { )) } - private fun formatList(list: List<String>): List<String> { - return config.statsDisplayList - .filter { it.shouldDisplay() } - .map { list[it.ordinal] } - .toMutableList() - } + private fun formatList(list: Map<ChocolateFactoryStat, String>): List<String> = + config.statsDisplayList.mapNotNull { list[it] } @SubscribeEvent fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { |