aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/garden
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-02-05 12:07:44 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-02-05 12:07:44 +0100
commit03ce43d928d18328e0cd731f161a7bfd794af3d3 (patch)
tree43d15879072646aadb03e212bb21fea60b3eeb59 /src/main/java/at/hannibal2/skyhanni/features/garden
parent95029eebcc73feac8842e953239cb71a0c1d1b48 (diff)
downloadskyhanni-03ce43d928d18328e0cd731f161a7bfd794af3d3.tar.gz
skyhanni-03ce43d928d18328e0cd731f161a7bfd794af3d3.tar.bz2
skyhanni-03ce43d928d18328e0cd731f161a7bfd794af3d3.zip
Moving pet menu check into PetAPI
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/garden')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt
index f93192a3d..d8fd9f13d 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt
@@ -1,6 +1,7 @@
package at.hannibal2.skyhanni.features.garden.fortuneguide
import at.hannibal2.skyhanni.config.Storage
+import at.hannibal2.skyhanni.data.PetAPI
import at.hannibal2.skyhanni.data.ProfileStorageData
import at.hannibal2.skyhanni.events.GardenToolChangeEvent
import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
@@ -49,10 +50,6 @@ class CaptureFarmingGear {
"uniquevisitors.tierprogress",
".* §e(?<having>.*)§6/(?<total>.*)"
)
- private val petMenuPattern by patternGroup.pattern(
- "petsmenu",
- "Pets(?: \\(\\d+/\\d+\\) )?"
- )
companion object {
private val strengthPattern = " Strength: §r§c❁(?<strength>.*)".toPattern()
@@ -131,7 +128,7 @@ class CaptureFarmingGear {
val farmingItems = farmingItems ?: return
val outdatedItems = outdatedItems ?: return
val items = event.inventoryItems
- petMenuPattern.matchMatcher(event.inventoryName) {
+ if (PetAPI.isPetMenu(event.inventoryName)) {
pets(farmingItems, items, outdatedItems)
return
}