diff options
author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2024-09-23 15:10:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-23 15:10:19 +0200 |
commit | 478e5c6ac5f587dbf5f6f45f6489cbe37b05fd2f (patch) | |
tree | e1018b2c3d189866f20683abb7b5392cc7b865fa /src/main/java/at/hannibal2/skyhanni/features | |
parent | 91dee900cc7bc40db5e936d2e9f2f18dcbbe870f (diff) | |
download | skyhanni-478e5c6ac5f587dbf5f6f45f6489cbe37b05fd2f.tar.gz skyhanni-478e5c6ac5f587dbf5f6f45f6489cbe37b05fd2f.tar.bz2 skyhanni-478e5c6ac5f587dbf5f6f45f6489cbe37b05fd2f.zip |
Improvement: Glacite Tunnels Area Navigation (#2544)
Co-authored-by: nea <nea@nea.moe>
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/mining/TunnelsMaps.kt | 10 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/IslandAreas.kt | 4 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/TunnelsMaps.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/TunnelsMaps.kt index 847a3673f..5214ff162 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/TunnelsMaps.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/TunnelsMaps.kt @@ -81,6 +81,7 @@ object TunnelsMaps { private var active: String = "" private lateinit var fairySouls: Map<String, GraphNode> + // TODO what is this? why is there a difference? can this be replaced with GraphNodeTag.GRIND_ORES? private lateinit var newGemstones: Map<String, List<GraphNode>> private lateinit var oldGemstones: Map<String, List<GraphNode>> private lateinit var normalLocations: Map<String, List<GraphNode>> @@ -221,7 +222,7 @@ object TunnelsMaps { @SubscribeEvent fun onRepoReload(event: RepositoryReloadEvent) { - graph = event.getConstant<Graph>("TunnelsGraph", gson = Graph.gson) + graph = event.getConstant<Graph>("island_graphs/GLACITE_TUNNELS", gson = Graph.gson) possibleLocations = graph.groupBy { it.name }.filterNotNullKeys().mapValues { (_, value) -> value } @@ -235,7 +236,12 @@ object TunnelsMaps { key.contains("Fairy") -> fairy[key] = value.first() newGemstonePattern.matches(key) -> newGemstone[key] = value oldGemstonePattern.matches(key) -> oldGemstone[key] = value - else -> other[key] = value + else -> { + // ignore node names without color codes + if (key.removeColor() != key) { + other[key] = value + } + } } } fairySouls = fairy diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/IslandAreas.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/IslandAreas.kt index 311af056e..d5e57d513 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/IslandAreas.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/IslandAreas.kt @@ -41,7 +41,7 @@ object IslandAreas { private var nodes = mapOf<GraphNode, Double>() private var paths = mapOf<GraphNode, Graph>() - private var display: Renderable? = null + var display: Renderable? = null private var targetNode: GraphNode? = null private var currentAreaName = "" private val textInput = TextInput() @@ -103,7 +103,7 @@ object IslandAreas { } } - private fun updatePosition() { + fun updatePosition() { display = buildDisplay().buildSearchBox(textInput) } |