aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-05-29 23:09:00 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-05-29 23:09:00 +0200
commit3abd085de6a31c24a92b05012a3b81e686065edc (patch)
tree79f1b3ce6044011e4c4f5830944a34aec1aef7f4 /src/main/java/at
parent0ae9e19f99e329858acf1154735b9c32aa72e049 (diff)
downloadskyhanni-3abd085de6a31c24a92b05012a3b81e686065edc.tar.gz
skyhanni-3abd085de6a31c24a92b05012a3b81e686065edc.tar.bz2
skyhanni-3abd085de6a31c24a92b05012a3b81e686065edc.zip
code cleanup and added regex test
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateShopPrice.kt21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateShopPrice.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateShopPrice.kt
index 8152271fe..1d977d22d 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateShopPrice.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateShopPrice.kt
@@ -43,6 +43,9 @@ object ChocolateShopPrice {
"shop.bought",
"§aYou bought §r§.(?<item>[\\w ]+)§r(?:§8 x(?<amount>\\d+)§r)?§a!"
)
+ /**
+ * REGEX-TEST: §7Chocolate Spent: §60
+ */
private val chocolateSpentPattern by ChocolateFactoryAPI.patternGroup.pattern(
"shop.spent",
"§7Chocolate Spent: §6(?<amount>[\\d,]+)"
@@ -143,15 +146,15 @@ object ChocolateShopPrice {
)
}
- val newList = mutableListOf<Renderable>()
- newList.add(Renderable.string("§e§lCoins per million chocolate§f:"))
- // TODO update this value every second
- // TODO add time until can afford
- newList.add(Renderable.string("§eChocolate available: §6${ChocolateAmount.CURRENT.formatted}"))
- // TODO add chocolate spend needed for next milestone
- newList.add(Renderable.string("§eChocolate spent: §6${chocolateSpent.addSeparators()}"))
- newList.add(LorenzUtils.fillTable(table, padding = 5, itemScale = config.itemScale))
- display = newList
+ display = buildList {
+ add(Renderable.string("§e§lCoins per million chocolate§f:"))
+ // TODO update this value every second
+ // TODO add time until can afford
+ add(Renderable.string("§eChocolate available: §6${ChocolateAmount.CURRENT.formatted}"))
+ // TODO add chocolate spend needed for next milestone
+ add(Renderable.string("§eChocolate spent: §6${chocolateSpent.addSeparators()}"))
+ add(LorenzUtils.fillTable(table, padding = 5, itemScale = config.itemScale))
+ }
}
@SubscribeEvent