diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt | 15 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobFarmingContestsInventory.kt | 1 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt index 05668871f..0bfc9c87b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt @@ -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 @@ -67,9 +66,16 @@ object GardenNextJacobContest { "day", "§aDay (?<day>.*)" ) + + /** + * REGEX-TEST: Early Spring, Year 351 + * REGEX-TEST: Late Summer, Year 351 + * REGEX-TEST: Autumn, Year 351 + */ + 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", @@ -187,11 +193,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() diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobFarmingContestsInventory.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobFarmingContestsInventory.kt index 72d3c6975..8cdde229f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobFarmingContestsInventory.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobFarmingContestsInventory.kt @@ -82,6 +82,7 @@ class JacobFarmingContestsInventory { @SubscribeEvent fun onSlotClick(event: GuiContainerEvent.SlotClickEvent) { + // TODO add tooltip line "click + press <keybind> to open on elite website if (!config.openOnElite.isKeyHeld()) return if (!LorenzUtils.inSkyBlock) return |