aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorsaga <45262877+saga-00@users.noreply.github.com>2024-07-21 07:30:44 -0300
committerGitHub <noreply@github.com>2024-07-21 12:30:44 +0200
commit30ad6049a0f84e2e7be6fe9c4e6ade9dcf159bf7 (patch)
treef33a80ded9fae11f10df672ea5e675d5674f5f03 /src/main/java/at/hannibal2/skyhanni/features
parentc95fa483cbe759238d70dc51c29eb397d24d2191 (diff)
downloadskyhanni-30ad6049a0f84e2e7be6fe9c4e6ade9dcf159bf7.tar.gz
skyhanni-30ad6049a0f84e2e7be6fe9c4e6ade9dcf159bf7.tar.bz2
skyhanni-30ad6049a0f84e2e7be6fe9c4e6ade9dcf159bf7.zip
Feature: Bestiary Level as Stack Size (#1945)
Co-authored-by: Cal <cwolfson58@gmail.com> Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt16
1 files changed, 16 insertions, 0 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 204cf0b6d..2cb5632f1 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt
@@ -23,6 +23,7 @@ import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumbe
import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.SKILL_LEVEL
import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.SKYBLOCK_LEVEL
import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.VACUUM_GARDEN
+import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.BESTIARY_LEVEL
import at.hannibal2.skyhanni.data.PetAPI
import at.hannibal2.skyhanni.events.RenderItemTipEvent
import at.hannibal2.skyhanni.features.garden.GardenAPI
@@ -93,6 +94,10 @@ object ItemDisplayOverlayFeatures {
"skyblocklevel",
"§7Your SkyBlock Level: §8\\[(?<level>§.\\d+)§8]",
)
+ private val bestiaryStackPattern by patternGroup.pattern(
+ "bestiarystack",
+ "§7Progress to Tier (?<tier>[\\dIVXC]+): §b[\\d.]+%"
+ )
@SubscribeEvent
fun onRenderItemTip(event: RenderItemTipEvent) {
@@ -283,6 +288,17 @@ object ItemDisplayOverlayFeatures {
}
}
+ if (BESTIARY_LEVEL.isSelected() && (chestName.contains("Bestiary ➜") || chestName.contains("Fishing ➜")) && lore.any { it.contains("Deaths: ") }) {
+ lore.matchFirst(bestiaryStackPattern) {
+ val tier = (group("tier").romanToDecimalIfNecessary() - 1)
+ return tier.toString()
+ } ?: run {
+ val tier = itemName.split(" ")
+
+ return tier.last().romanToDecimalIfNecessary().toString()
+ }
+ }
+
return null
}