diff options
author | Brandon <brandon.wamboldt@gmail.com> | 2023-12-14 20:10:57 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-15 01:10:57 +0100 |
commit | c37a73faa53d2a4c5396ba3f83efb794d3761034 (patch) | |
tree | 94438e0100a79ba4ea91c8654e810d95d731ff08 /src/main/java/at/hannibal2 | |
parent | 845562896f387d6ada729d907fb63a677edd35e1 (diff) | |
download | skyhanni-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')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/dungeon/PartyFinderConfig.java | 6 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonFinderFeatures.kt | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/PartyFinderConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/PartyFinderConfig.java index 2abb3ec22..17c0ab6ad 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/PartyFinderConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/PartyFinderConfig.java @@ -26,6 +26,12 @@ public class PartyFinderConfig { public boolean markPaidCarries = true; @Expose + @ConfigOption(name = "Mark Perm/VC Parties", desc = "Highlight perm parties and parties that require a VC with a purple background to make them easier to find/skip.") + @ConfigEditorBoolean + @FeatureToggle + public boolean markNonPugs = true; + + @Expose @ConfigOption(name = "Mark Low Levels", desc = "Highlight groups with players at or below the specified class level to make them easier to find/skip.") @ConfigEditorSlider(minValue = 0, maxValue = 50, minStep = 1) public int markBelowClassLevel = 0; 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) ?: "" }
|