Skip to content

Commit

Permalink
Fix: Calendar pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
CalMWolfs committed May 23, 2024
1 parent 890d17b commit 243b862
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import at.hannibal2.skyhanni.utils.SimpleTimeMark.Companion.asTimeMark
import at.hannibal2.skyhanni.utils.SkyBlockTime
import at.hannibal2.skyhanni.utils.SoundUtils
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
import at.hannibal2.skyhanni.utils.StringUtils.matches
import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import at.hannibal2.skyhanni.utils.TabListData
import at.hannibal2.skyhanni.utils.TimeUtils.format
Expand Down Expand Up @@ -69,7 +68,7 @@ object GardenNextJacobContest {
)
val monthPattern by patternGroup.pattern(
"month",
"(?<month>.*), Year (?<year>.*)"
"(?<month>(?:\\w+ )?(?:Summer|Spring|Winter|Autumn)), Year (?<year>\\d+)"
)
private val cropPattern by patternGroup.pattern(
"crop",
Expand Down Expand Up @@ -187,11 +186,8 @@ object GardenNextJacobContest {
@SubscribeEvent
fun onInventoryOpen(event: InventoryFullyOpenedEvent) {
if (!config.display) return
if (!monthPattern.matches(event.inventoryName)) return

inCalendar = true

monthPattern.matchMatcher(event.inventoryName) {
inCalendar = true
val month = LorenzUtils.getSBMonthByName(group("month"))
val year = group("year").toInt()

Expand Down

0 comments on commit 243b862

Please sign in to comment.