diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java | 1 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt | 13 |
2 files changed, 14 insertions, 0 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 0586e9e33..bc333cfb8 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 @@ -87,6 +87,7 @@ public class InventoryConfig { VACUUM_GARDEN("§bVacuum (Garden)", 14), BOTTLE_OF_JYRRE("§bBottle Of Jyrre", 15), EDITION_NUMBER("§bEdition Number", 16), + SECRET_BINGO_DISCOVERY("§bSecret Bingo Discovery"), ; 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 72506d4ab..f9008713d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt @@ -19,6 +19,7 @@ import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumbe import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.RANCHERS_BOOTS_SPEED import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.SKILL_LEVEL import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.VACUUM_GARDEN +import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.SECRET_BINGO_DISCOVERY import at.hannibal2.skyhanni.events.RenderItemTipEvent import at.hannibal2.skyhanni.features.garden.pests.PestAPI import at.hannibal2.skyhanni.utils.ConfigUtils @@ -30,6 +31,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 import at.hannibal2.skyhanni.utils.NumberUtil.formatNumber import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimal import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimalIfNecessary @@ -50,6 +52,7 @@ object ItemDisplayOverlayFeatures { private val gardenVacuumPatterm = "§7Vacuum Bag: §6(?<amount>\\d*) Pests?".toPattern() private val harvestPattern = "§7§7You may harvest §6(?<amount>.).*".toPattern() private val dungeonPotionPattern = "Dungeon (?<level>.*) Potion".toPattern() + private val secretBingoDiscoveryPattern = "(§.)*You were the (§.)*(?<nth>[\\w]+)(?<ordinal>(st|nd|rd|th)) (§.)*to".toPattern() private val bottleOfJyrre = "NEW_BOTTLE_OF_JYRRE".asInternalName() @@ -60,6 +63,7 @@ object ItemDisplayOverlayFeatures { private fun getStackTip(item: ItemStack): String { val itemName = item.cleanName() + val chestName = InventoryUtils.openInventoryName() if (MASTER_STAR_TIER.isSelected()) { when (itemName) { @@ -220,6 +224,15 @@ object ItemDisplayOverlayFeatures { } } + if (SECRET_BINGO_DISCOVERY.isSelected() && chestName == "Bingo Card" && item.getLore().last() == "§aGOAL REACHED") { + for (line in item.getLore()) { + secretBingoDiscoveryPattern.matchMatcher(line) { + val nth = group("nth").formatNumber() + if (nth < 10000) return "${NumberUtil.format(nth)}" + } + } + } + return "" } |