diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/UtilsPatterns.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/UtilsPatterns.kt | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/UtilsPatterns.kt b/src/main/java/at/hannibal2/skyhanni/utils/UtilsPatterns.kt new file mode 100644 index 000000000..fdaa65050 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/utils/UtilsPatterns.kt @@ -0,0 +1,38 @@ +package at.hannibal2.skyhanni.utils + +import at.hannibal2.skyhanni.utils.LorenzUtils.enumJoinToPattern +import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern + +object UtilsPatterns { + + private val patternGroup = RepoPattern.group("utils") + + /** Examples: + §d§l§ka§r §d§l§d§lMYTHIC ACCESSORY §d§l§ka + §d§l§ka§r §d§l§d§lSHINY MYTHIC DUNGEON CHESTPLATE §d§l§ka + §c§l§ka§r §c§l§c§lVERY SPECIAL HATCESSORY §c§l§ka + §6§lSHINY LEGENDARY DUNGEON BOOTS + §6§lLEGENDARY DUNGEON BOOTS + §5§lEPIC BOOTS + §f§lCOMMON + **/ + val rarityLoreLinePattern by patternGroup.pattern( + "item.lore.rarity.line", + "^(?:§.){2,3}(?:.§. (?:§.){4})?(?:SHINY )?(?<rarity>${enumJoinToPattern<LorenzRarity> { it.name.replace("_", " ") }}) ?(?:DUNGEON )?(?<itemCategory>[^§]*)(?: (?:§.){3}.)?$" + ) + + val abiPhonePattern by patternGroup.pattern( + "item.name.abiphone", + ".{2}Abiphone .*" + ) + + val enchantedBookPattern by patternGroup.pattern( + "item.name.enchanted.book", + ".{2}?Enchanted Book" + ) + + val potionPattern by patternGroup.pattern( + "item.name.potion", + ".*Potion" + ) +} |