diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-02-05 12:07:44 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-02-05 12:07:44 +0100 |
commit | 03ce43d928d18328e0cd731f161a7bfd794af3d3 (patch) | |
tree | 43d15879072646aadb03e212bb21fea60b3eeb59 /src/main/java/at/hannibal2/skyhanni/data/PetAPI.kt | |
parent | 95029eebcc73feac8842e953239cb71a0c1d1b48 (diff) | |
download | skyhanni-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/data/PetAPI.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/PetAPI.kt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/PetAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/PetAPI.kt index d8061683b..f422c0b12 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/PetAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/PetAPI.kt @@ -1,6 +1,15 @@ package at.hannibal2.skyhanni.data +import at.hannibal2.skyhanni.utils.StringUtils.matches +import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern + object PetAPI { + private val petMenuPattern by RepoPattern.pattern( + "misc.pet.menu.title", + "Pets(?: \\(\\d+/\\d+\\) )?" + ) + + fun isPetMenu(inventoryTitle: String): Boolean = petMenuPattern.matches(inventoryTitle) // Contains color code + name and for older SkyHanni users maybe also the pet level var currentPet: String? |