Skip to content

Commit

Permalink
hi detekt
Browse files Browse the repository at this point in the history
  • Loading branch information
martimavocado committed Oct 29, 2024
1 parent fcb46b9 commit af9a3fb
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ object BasketWaypoints {
"main.scoreboard.basket",
"^Baskets Found: §a\\d+§f/§a\\d+\$"
)

@Suppress("MaxLineLength")
private val basketPattern by patternGroup.pattern(
"basket",
"^((?:§.)+You found a Candy Basket! (?:(?:§.)+\\((?:§.)+(?<current>\\d+)(?:§.)+/(?:§.)+(?<max>\\d+)(?:§.)+\\))?|(?:§.)+You already found this Candy Basket!)\$"
Expand Down Expand Up @@ -113,6 +115,10 @@ object BasketWaypoints {

@SubscribeEvent
fun onScoreboardChange(event: ScoreboardUpdateEvent) {
if (LorenzUtils.inSkyBlock) {
isActive = false
return
}
var titleMatches = false
var halloweenMatches = false
var basketMatches = false
Expand Down Expand Up @@ -162,7 +168,9 @@ object BasketWaypoints {
}

private fun getClosest(nodeList: List<GraphNode>? = null): EventWaypoint? {
val nodes = nodeList ?: IslandGraphs.currentIslandGraph?.nodes?.filter { GraphNodeTag.HALLOWEEN_BASKET in it.tags }.orEmpty()
val nodes = nodeList ?: IslandGraphs.currentIslandGraph?.nodes?.filter {
GraphNodeTag.HALLOWEEN_BASKET in it.tags
}.orEmpty()

val unFoundBaskets = basketList.filter { !it.isFound }.map { it.position }
val unFoundNodes = nodes.filter { it.position in unFoundBaskets }
Expand Down

0 comments on commit af9a3fb

Please sign in to comment.