From a556cf5d81eadc41faf37e0b56426d5dc796b651 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Thu, 14 Mar 2024 21:17:27 +0100 Subject: Fix: crimson isle detection after tab list widget (#1167) Co-authored-by: Alexia Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../nether/reputationhelper/CrimsonIsleReputationHelper.kt | 12 ++++++++++++ .../nether/reputationhelper/dailyquest/QuestLoader.kt | 3 +++ 2 files changed, 15 insertions(+) (limited to 'src/main/java') diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt index bb12afda2..ff6ba8987 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt @@ -24,6 +24,7 @@ import at.hannibal2.skyhanni.utils.LorenzVec import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAndItems import at.hannibal2.skyhanni.utils.SimpleTimeMark import at.hannibal2.skyhanni.utils.TabListData +import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -42,6 +43,17 @@ class CrimsonIsleReputationHelper(skyHanniMod: SkyHanniMod) { private var display = emptyList>() private var dirty = true + /** + * c - Barbarian Not Accepted + * d - Mage Not Accepted + * e - Accepted + * a - Completed + */ + val tabListQuestPattern by RepoPattern.pattern( + "crimson.reputation.tablist", + " §r§[cdea].*" + ) + init { skyHanniMod.loadModule(questHelper) skyHanniMod.loadModule(miniBossHelper) diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt index 7202e1047..20497e75d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt @@ -17,6 +17,7 @@ import at.hannibal2.skyhanni.test.command.ErrorManager import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.StringUtils.matches import at.hannibal2.skyhanni.utils.TabListData class QuestLoader(private val dailyQuestHelper: DailyQuestHelper) { @@ -51,6 +52,8 @@ class QuestLoader(private val dailyQuestHelper: DailyQuestHelper) { } private fun readQuest(line: String) { + if (!dailyQuestHelper.reputationHelper.tabListQuestPattern.matches(line)) return + if (line.contains("The Great Spook")) { dailyQuestHelper.greatSpook = true dailyQuestHelper.update() -- cgit