aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-01-06 11:23:22 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-01-06 11:23:22 +0100
commit4f8e40e3b95a6839d660bace2f2cd04d2db2a101 (patch)
tree91fd8ae41c9cbc87783065d34b46d7fa873d8ceb /src/main/java/at/hannibal2
parent964f3472fe63b884b004405a5b6bf608eb9c1fb4 (diff)
downloadskyhanni-4f8e40e3b95a6839d660bace2f2cd04d2db2a101.tar.gz
skyhanni-4f8e40e3b95a6839d660bace2f2cd04d2db2a101.tar.bz2
skyhanni-4f8e40e3b95a6839d660bace2f2cd04d2db2a101.zip
Using function isOwnVacuum()
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt14
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 {