From ae88647c121f0349bf0eb1455224d1ef1e95f7c7 Mon Sep 17 00:00:00 2001 From: Phoebe <77941535+catgirlseraid@users.noreply.github.com> Date: Sat, 18 May 2024 13:31:08 +1200 Subject: choc factory stats show prestige level (#1827) Co-authored-by: SeRaid <77941535+SeRaid743@users.noreply.github.com> --- .../inventory/chocolatefactory/ChocolateFactoryStats.kt | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/main/java/at') diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryStats.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryStats.kt index f067146bf..87aa21023 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryStats.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryStats.kt @@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.events.SecondPassedEvent import at.hannibal2.skyhanni.utils.ClipboardUtils import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators +import at.hannibal2.skyhanni.utils.NumberUtil.toRoman import at.hannibal2.skyhanni.utils.RenderUtils.renderRenderables import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.TimeUtils.format @@ -71,7 +72,7 @@ object ChocolateFactoryStats { val upgradeAvailableAt = ChocolateAmount.CURRENT.formattedTimeUntilGoal(profileStorage.bestUpgradeCost) val map = buildMap { - put(ChocolateFactoryStat.HEADER, "§6§lChocolate Factory Stats") + put(ChocolateFactoryStat.HEADER, "§6§lChocolate Factory ${ChocolateFactoryAPI.currentPrestige.toRoman()}") put(ChocolateFactoryStat.CURRENT, "§eCurrent Chocolate: §6${ChocolateAmount.CURRENT.formatted}") put(ChocolateFactoryStat.THIS_PRESTIGE, "§eThis Prestige: §6${ChocolateAmount.PRESTIGE.formatted}") @@ -122,12 +123,8 @@ object ChocolateFactoryStats { tips = listOf("§bCopy to Clipboard!"), onClick = { val list = text.toMutableList() - val titleHeader = list.indexOf("§6§lChocolate Factory Stats") - if (titleHeader != -1) { - list[titleHeader] = "${LorenzUtils.getPlayerName()}'s Chocolate Factory Stats" - } else { - list.add(0, "${LorenzUtils.getPlayerName()}'s Chocolate Factory Stats") - } + list.add(0, "${LorenzUtils.getPlayerName()}'s Chocolate Factory Stats") + ClipboardUtils.copyToClipboard(list.joinToString("\n") { it.removeColor() }) } )) -- cgit