diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-25 19:35:25 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-25 19:35:25 +0100 |
commit | bbd95a7a18d7c1f157dd27772224cdb37d108a99 (patch) | |
tree | 37f567309a8f97cadcea74d95946e4daaddafff2 /src/main/java/at/hannibal2 | |
parent | 298c9823542391d06f5cf133436e6e9e8302d215 (diff) | |
download | skyhanni-bbd95a7a18d7c1f157dd27772224cdb37d108a99.tar.gz skyhanni-bbd95a7a18d7c1f157dd27772224cdb37d108a99.tar.bz2 skyhanni-bbd95a7a18d7c1f157dd27772224cdb37d108a99.zip |
Show max pest bag of 40
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt index 61a18a317..57b3ec36c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt @@ -11,6 +11,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.LorenzUtils.between import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NumberUtil.formatNumber import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimal import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimalIfNeeded import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher @@ -23,14 +24,14 @@ class ItemDisplayOverlayFeatures { private val rancherBootsSpeedCapPattern = "§7Current Speed Cap: §a(?<cap>.*)".toPattern() private val petLevelPattern = "\\[Lvl (?<level>.*)] .*".toPattern() - private val garenVacuumVariants = listOf( + private val gardenVacuumVariants = listOf( "SKYMART_VACUUM".asInternalName(), "SKYMART_TURBO_VACUUM".asInternalName(), "SKYMART_HYPER_VACUUM".asInternalName(), "INFINI_VACUUM".asInternalName(), "INFINI_VACUUM_HOOVERIUS".asInternalName(), ) - private val gardenVacuumPatterm = "§7Vacuum Bag: §6(?<amount>.*) Pests?".toPattern() + private val gardenVacuumPatterm = "§7Vacuum Bag: §6(?<amount>\\d*) Pests?".toPattern() @SubscribeEvent fun onRenderItemTip(event: RenderItemTipEvent) { @@ -178,10 +179,11 @@ class ItemDisplayOverlayFeatures { } if (itemNumberAsStackSize.contains(14)) { - if (item.getInternalNameOrNull() in garenVacuumVariants) { + if (item.getInternalNameOrNull() in gardenVacuumVariants) { for (line in item.getLore()) { gardenVacuumPatterm.matchMatcher(line) { - return group("amount") + val pests = group("amount").formatNumber() + return if (pests > 39) "§640" else "$pests" } } } |