diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt | 14 |
1 files changed, 6 insertions, 8 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 29473a88a..aa3a81311 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt @@ -55,7 +55,8 @@ 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 bingoGoalRankPattern = "(§.)*You were the (§.)*(?<rank>[\\w]+)(?<ordinal>(st|nd|rd|th)) (§.)*to".toPattern() + private val bingoGoalRankPattern = + "(§.)*You were the (§.)*(?<rank>[\\w]+)(?<ordinal>(st|nd|rd|th)) (§.)*to".toPattern() private val bottleOfJyrre = "NEW_BOTTLE_OF_JYRRE".asInternalName() @@ -202,13 +203,7 @@ object ItemDisplayOverlayFeatures { } } - if (VACUUM_GARDEN.isSelected() && item.getInternalNameOrNull() in PestAPI.vacuumVariants) { - for (line in lore) { - if (line.contains("Click to trade!") || line.contains("Starting bid:") || line.contains("Buy it now:")) { - return "" - } - } - + if (VACUUM_GARDEN.isSelected() && item.getInternalNameOrNull() in PestAPI.vacuumVariants && isOwnVacuum(lore)) { for (line in lore) { gardenVacuumPatterm.matchMatcher(line) { val pests = group("amount").formatNumber() @@ -251,6 +246,9 @@ object ItemDisplayOverlayFeatures { return "" } + private fun isOwnVacuum(lore: List<String>) = + lore.none { it.contains("Click to trade!") || it.contains("Starting bid:") || it.contains("Buy it now:") } + var done = false private fun grabSackName(name: String): String { |