aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt16
2 files changed, 18 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java
index 37201d64c..684e2bb79 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java
@@ -142,7 +142,8 @@ public class InventoryConfig {
DARK_CACAO_TRUFFLE("§bDark Cacao Truffle"),
EDITION_NUMBER("§bEdition Number", 16),
BINGO_GOAL_RANK("§bBingo Goal Rank"),
- SKYBLOCK_LEVEL("§bSkyblock Level")
+ SKYBLOCK_LEVEL("§bSkyblock Level"),
+ BESTIARY_LEVEL("§bBestiary Level")
;
private final String str;
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
}