diff options
Diffstat (limited to 'src')
5 files changed, 25 insertions, 16 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt index 575534400..58d03a32f 100644 --- a/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt @@ -33,12 +33,13 @@ object GetFromSackAPI { val commands = arrayOf("gfs", "getfromsacks") val commandsWithSlash = commands.map { "/$it" } - private val fromSacksChatPattern by RepoPattern.pattern( - "gfs.chat.from", + private val patternGroup = RepoPattern.group("gfs.chat") + private val fromSacksChatPattern by patternGroup.pattern( + "from", "§aMoved §r§e(?<amount>\\d+) (?<item>.+)§r§a from your Sacks to your inventory." ) - private val missingChatPattern by RepoPattern.pattern( - "gfs.chat.missing", + private val missingChatPattern by patternGroup.pattern( + "missing", "§cYou have no (?<item>.+) in your Sacks!" ) diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/DojoRankDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/DojoRankDisplay.kt index ae987a2f9..6b4e8a064 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/DojoRankDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/DojoRankDisplay.kt @@ -22,7 +22,10 @@ class DojoRankDisplay { private val config get() = SkyHanniMod.feature.crimsonIsle private var display = emptyList<String>() private val patternGroup = RepoPattern.group("inventory.dojo.rankdisplay") - private val testNamePattern by patternGroup.pattern("name", "(?<color>§\\w)Test of (?<name>.*)") + private val testNamePattern by patternGroup.pattern( + "name", + "(?<color>§\\w)Test of (?<name>.*)" + ) private val testRankPattern by patternGroup.pattern( "rank", "(?:§\\w)+Your Rank: (?<rank>§\\w.) §8\\((?<score>\\d+)\\)" diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/QuiverNotification.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/QuiverNotification.kt index 40e51c226..d80ef783c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/QuiverNotification.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/QuiverNotification.kt @@ -5,13 +5,15 @@ import at.hannibal2.skyhanni.data.TitleManager import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.utils.SoundUtils import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher -import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration.Companion.seconds object QuiverNotification { - private val quiverChatPattern by RepoPattern.pattern("inventory.quiver.chat.low", "§cYou only have (?<arrowsLeft>.*) arrows left in your Quiver!") + private val quiverChatPattern by RepoPattern.pattern( + "inventory.quiver.chat.low", + "§cYou only have (?<arrowsLeft>.*) arrows left in your Quiver!" + ) @SubscribeEvent fun onChatMessage(event: LorenzChatEvent) { if (!SkyHanniMod.configManager.features.inventory.quiverAlert) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/SkyblockGuideHighlightFeature.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/SkyblockGuideHighlightFeature.kt index 4cbaf896e..3de2803dc 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/SkyblockGuideHighlightFeature.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/SkyblockGuideHighlightFeature.kt @@ -17,7 +17,7 @@ import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import org.intellij.lang.annotations.Language -val group = RepoPattern.group("skyblockguide.highlight") +val patternGroup = RepoPattern.group("skyblockguide.highlight") private const val keyPrefixInventory = "inventory" private const val keyPrefixCondition = "condition" @@ -42,8 +42,8 @@ class SkyblockGuideHighlightFeature private constructor( onTooltip: (LorenzToolTipEvent) -> Unit = {}, ) : this( config, - group.pattern("$key.$keyPrefixInventory", inventory), - group.pattern("$key.$keyPrefixCondition", loreCondition), + patternGroup.pattern("$key.$keyPrefixInventory", inventory), + patternGroup.pattern("$key.$keyPrefixCondition", loreCondition), onSlotClicked, onTooltip ) @@ -55,7 +55,7 @@ class SkyblockGuideHighlightFeature private constructor( loreCondition: RepoPattern, onSlotClicked: (GuiContainerEvent.SlotClickEvent) -> Unit = {}, onTooltip: (LorenzToolTipEvent) -> Unit = {}, - ) : this(config, group.pattern("$key.$keyPrefixInventory", inventory), loreCondition, onSlotClicked, onTooltip) + ) : this(config, patternGroup.pattern("$key.$keyPrefixInventory", inventory), loreCondition, onSlotClicked, onTooltip) init { objectList.add(this) @@ -125,12 +125,12 @@ class SkyblockGuideHighlightFeature private constructor( } private val taskOnlyCompleteOncePattern = - group.pattern("$keyPrefixCondition.once", "§7§eThis task can only be completed once!") - private val xPattern = group.pattern("$keyPrefixCondition.x", "§c ?✖.*") + patternGroup.pattern("$keyPrefixCondition.once", "§7§eThis task can only be completed once!") + private val xPattern = patternGroup.pattern("$keyPrefixCondition.x", "§c ?✖.*") private val totalProgressPattern = - group.pattern("$keyPrefixCondition.total", "§7Total Progress: §3\\d{1,2}(?:\\.\\d)?%") + patternGroup.pattern("$keyPrefixCondition.total", "§7Total Progress: §3\\d{1,2}(?:\\.\\d)?%") private val categoryProgressPattern = - group.pattern("$keyPrefixCondition.category", "§7Progress to Complete Category: §6\\d{1,2}(?:\\.\\d)?%") + patternGroup.pattern("$keyPrefixCondition.category", "§7Progress to Complete Category: §6\\d{1,2}(?:\\.\\d)?%") private val openWikiOnClick: (GuiContainerEvent.SlotClickEvent) -> Unit = { event -> val internalName = event.item?.getInternalName() diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/RestorePieceOfWizardPortalLore.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/RestorePieceOfWizardPortalLore.kt index deedd7f98..7532c8afe 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/RestorePieceOfWizardPortalLore.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/RestorePieceOfWizardPortalLore.kt @@ -16,7 +16,10 @@ class RestorePieceOfWizardPortalLore { private val item by lazy { "WIZARD_PORTAL_MEMENTO".asInternalName() } - private val earnedPattern by RepoPattern.pattern("misc.restore.wizard.portal.earned", "§7Earned by:.*") + private val earnedPattern by RepoPattern.pattern( + "misc.restore.wizard.portal.earned", + "§7Earned by:.*" + ) @SubscribeEvent fun onTooltip(event: LorenzToolTipEvent) { |