Skip to content

Commit

Permalink
Bug Fix: Fix pets menu detection for /ff (#970)
Browse files Browse the repository at this point in the history
Fixing pets menu detection for /ff #970
  • Loading branch information
martimavocado authored Feb 5, 2024
1 parent 426fb7e commit 95029ee
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ 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()
Expand Down Expand Up @@ -127,9 +131,12 @@ class CaptureFarmingGear {
val farmingItems = farmingItems ?: return
val outdatedItems = outdatedItems ?: return
val items = event.inventoryItems
petMenuPattern.matchMatcher(event.inventoryName) {
pets(farmingItems, items, outdatedItems)
return
}
when (event.inventoryName) {
"Your Equipment and Stats" -> equipmentAndStats(items, farmingItems, outdatedItems)
"Pets" -> pets(farmingItems, items, outdatedItems)
"Your Skills" -> skills(items, storage)
"Community Shop" -> communityShop(items)
"Configure Plots" -> configurePlots(items, storage)
Expand Down

0 comments on commit 95029ee

Please sign in to comment.