aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorJ10a1n15 <45315647+j10a1n15@users.noreply.github.com>2024-04-27 11:42:19 +0200
committerGitHub <noreply@github.com>2024-04-27 11:42:19 +0200
commitb1ca6d79a772f5cb6abb7aab8575b36705d75911 (patch)
tree4a8619e383e151d402cf9da9c24a17eee16d802e /src/main
parent8f7e9ae1711ca4172c7a2fe046666d33033906c2 (diff)
downloadskyhanni-b1ca6d79a772f5cb6abb7aab8575b36705d75911.tar.gz
skyhanni-b1ca6d79a772f5cb6abb7aab8575b36705d75911.tar.bz2
skyhanni-b1ca6d79a772f5cb6abb7aab8575b36705d75911.zip
Fix: Custom Scoreboard not detection M7 Dragons during Derpy (#1561)
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/dev/DevConfig.java6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/CustomScoreboardConfig.java5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboard.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardPattern.kt2
5 files changed, 9 insertions, 10 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/dev/DevConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dev/DevConfig.java
index c6aac8bbe..950aa2169 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/dev/DevConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/dev/DevConfig.java
@@ -44,12 +44,6 @@ public class DevConfig {
@ConfigEditorBoolean
public boolean worldEdit = false;
- @Expose
- @ConfigOption(name = "Unknown Lines warning", desc = "Gives a chat warning when unknown lines are found in the scoreboard." +
- "\nCustom Scoreboard debug option")
- @ConfigEditorBoolean
- public boolean unknownLinesWarning = false;
-
@ConfigOption(name = "Parkour Waypoints", desc = "")
@Accordion
@Expose
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/CustomScoreboardConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/CustomScoreboardConfig.java
index 4dc1c647d..126d4646e 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/CustomScoreboardConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/CustomScoreboardConfig.java
@@ -47,6 +47,11 @@ public class CustomScoreboardConfig {
public InformationFilteringConfig informationFiltering = new InformationFilteringConfig();
@Expose
+ @ConfigOption(name = "Unknown Lines warning", desc = "Gives a chat warning when unknown lines are found in the scoreboard.")
+ @ConfigEditorBoolean
+ public boolean unknownLinesWarning = true;
+
+ @Expose
@ConfigLink(owner = CustomScoreboardConfig.class, field = "enabled")
public Position position = new Position(10, 80, false, true);
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboard.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboard.kt
index 329b09f0e..957808fb5 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboard.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboard.kt
@@ -103,7 +103,6 @@ class CustomScoreboard {
internal val maxwellConfig get() = displayConfig.maxwell
internal val informationFilteringConfig get() = config.informationFiltering
internal val backgroundConfig get() = config.background
- internal val devConfig get() = SkyHanniMod.feature.dev
}
private fun createLines() = buildList<ScoreboardElementType> {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt
index 6cb8c1b39..41e946a17 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt
@@ -18,7 +18,7 @@ import at.hannibal2.skyhanni.data.ScoreboardData
import at.hannibal2.skyhanni.data.SlayerAPI
import at.hannibal2.skyhanni.features.dungeon.DungeonAPI
import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.Companion.arrowConfig
-import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.Companion.devConfig
+import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.Companion.config
import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.Companion.displayConfig
import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.Companion.informationFilteringConfig
import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.Companion.maxwellConfig
@@ -778,7 +778,7 @@ private fun getExtraDisplayPair(): List<ScoreboardElementType> {
if (unknownLines.isEmpty()) return listOf("<hidden>" to HorizontalAlignment.LEFT)
val size = unknownLines.size
- if (amountOfUnknownLines != size && devConfig.unknownLinesWarning) {
+ if (amountOfUnknownLines != size && config.unknownLinesWarning) {
val message = "CustomScoreboard detected ${pluralize(unknownLines.size, "unknown line", withNumber = true)}"
ErrorManager.logErrorWithData(
CustomScoreboardUtils.UndetectedScoreboardLines(message),
@@ -787,6 +787,7 @@ private fun getExtraDisplayPair(): List<ScoreboardElementType> {
"Island" to HypixelData.skyBlockIsland,
"Area" to HypixelData.skyBlockArea,
noStackTrace = true,
+ betaOnly = true,
)
amountOfUnknownLines = size
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardPattern.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardPattern.kt
index 5d4847957..42040f7c8 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardPattern.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardPattern.kt
@@ -94,7 +94,7 @@ object ScoreboardPattern {
private val dungeonSb = scoreboardGroup.group("dungeon")
val m7dragonsPattern by dungeonSb.pattern(
"m7dragons",
- "^(§cNo Alive Dragons|§8- (§.)+[\\w\\s]+Dragon§a \\w+§.❤)$"
+ "^(§cNo Alive Dragons|§8- (?:§.)+[\\w\\s]+Dragon§a [\\w,.]+§.❤)$"
)
val keysPattern by dungeonSb.pattern(
"keys",