aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorBrandon <brandon.wamboldt@gmail.com>2023-12-14 20:10:57 -0400
committerGitHub <noreply@github.com>2023-12-15 01:10:57 +0100
commitc37a73faa53d2a4c5396ba3f83efb794d3761034 (patch)
tree94438e0100a79ba4ea91c8654e810d95d731ff08 /src/main/java/at/hannibal2/skyhanni/features
parent845562896f387d6ada729d907fb63a677edd35e1 (diff)
downloadskyhanni-c37a73faa53d2a4c5396ba3f83efb794d3761034.tar.gz
skyhanni-c37a73faa53d2a4c5396ba3f83efb794d3761034.tar.bz2
skyhanni-c37a73faa53d2a4c5396ba3f83efb794d3761034.zip
Add option to highlight dungeon perm/vc parties (#803)
Add option to highlight dungeon perm/vc parties. #803
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonFinderFeatures.kt10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonFinderFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonFinderFeatures.kt
index a99c081c1..a1fdc018e 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonFinderFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonFinderFeatures.kt
@@ -25,6 +25,7 @@ class DungeonFinderFeatures {
private val pricePattern = "([0-9]{2,3}K|[0-9]{1,3}M|[0-9]+\\.[0-9]M|[0-9] ?mil)".toRegex(RegexOption.IGNORE_CASE)
private val carryPattern = "(carry|cary|carries|caries|comp|to cata [0-9]{2})".toRegex(RegexOption.IGNORE_CASE)
+ private val nonPugPattern = "(perm|vc|discord)".toRegex(RegexOption.IGNORE_CASE)
private val memberPattern = "^ §.*?§.: §.([A-Z]+)§. \\(§.([0-9]+)§.\\)".toRegex(RegexOption.IGNORE_CASE)
private val ineligiblePattern =
"^§c(Requires .*$|You don't meet the requirement!|Complete previous floor first!$)".toRegex()
@@ -120,6 +121,15 @@ class DungeonFinderFeatures {
}
}
+ if (config.markNonPugs) {
+ val note = slot.stack.getLore().filter { notePattern.containsMatchIn(it) }.joinToString(" ")
+
+ if (nonPugPattern.containsMatchIn(note)) {
+ slot highlight LorenzColor.LIGHT_PURPLE
+ continue
+ }
+ }
+
val members = slot.stack.getLore().filter { memberPattern.matches(it) }
val memberLevels = members.map { memberPattern.matchEntire(it)?.groupValues?.get(2)?.toInt() ?: 0 }
val memberClasses = members.map { memberPattern.matchEntire(it)?.groupValues?.get(1) ?: "" }