aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal002@users.noreply.github.com>2024-03-14 21:17:27 +0100
committerGitHub <noreply@github.com>2024-03-14 21:17:27 +0100
commita556cf5d81eadc41faf37e0b56426d5dc796b651 (patch)
tree0ab0d6155e890185c58559641ce20f82c43413b2 /src/main/java
parent849888602b882ba52a0db97aa541a991c132cfe5 (diff)
downloadskyhanni-a556cf5d81eadc41faf37e0b56426d5dc796b651.tar.gz
skyhanni-a556cf5d81eadc41faf37e0b56426d5dc796b651.tar.bz2
skyhanni-a556cf5d81eadc41faf37e0b56426d5dc796b651.zip
Fix: crimson isle detection after tab list widget (#1167)
Co-authored-by: Alexia <me@alexia.lol> Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt12
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt3
2 files changed, 15 insertions, 0 deletions
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<List<Any>>()
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()