Skip to content

Commit

Permalink
Fixed carnival goal display rarely showing outside of the hub island.
Browse files Browse the repository at this point in the history
  • Loading branch information
hannibal002 committed Oct 20, 2024
1 parent 90b8691 commit 9a4e8ce
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/main/java/at/hannibal2/skyhanni/features/misc/IslandAreas.kt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ object IslandAreas {
display = null
targetNode = null
hasMoved = true
updateArea("no_area")
}

fun nodeMoved() {
Expand Down Expand Up @@ -172,11 +173,7 @@ object IslandAreas {
addSearchString("§7Not in an area.")
}
}
if (name != currentAreaName) {
val oldArea = currentAreaName
currentAreaName = name
GraphAreaChangeEvent(name, oldArea).post()
}
updateArea(name)

addSearchString("§eAreas nearby:")
continue
Expand Down Expand Up @@ -224,6 +221,14 @@ object IslandAreas {
}
}

private fun updateArea(name: String) {
if (name != currentAreaName) {
val oldArea = currentAreaName
currentAreaName = name
GraphAreaChangeEvent(name, oldArea).post()
}
}

@HandleEvent
fun onAreaChange(event: GraphAreaChangeEvent) {
val name = event.area
Expand Down

0 comments on commit 9a4e8ce

Please sign in to comment.