diff options
Diffstat (limited to 'src')
-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) ?: "" }
|