diff options
author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2024-08-31 00:35:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-31 00:35:14 +0200 |
commit | d298d2a04fa4d0cbcb4f03fae84cc2f498e06a63 (patch) | |
tree | e165ce9a10d732689a9bd4b62bf65349826c01ee /src/main/java | |
parent | 01923d311bcb32594209db0ad024611d569361c0 (diff) | |
download | skyhanni-d298d2a04fa4d0cbcb4f03fae84cc2f498e06a63.tar.gz skyhanni-d298d2a04fa4d0cbcb4f03fae84cc2f498e06a63.tar.bz2 skyhanni-d298d2a04fa4d0cbcb4f03fae84cc2f498e06a63.zip |
Fix: Tunnel Maps commission (#2432)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/mining/TunnelsMaps.kt | 14 |
1 files changed, 13 insertions, 1 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 13d8c53e7..d2d351878 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/TunnelsMaps.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/TunnelsMaps.kt @@ -152,6 +152,8 @@ object TunnelsMaps { private val ROYAL_PIGEON by lazy { "ROYAL_PIGEON".asInternalName() } + private var isCommission = false + @SubscribeEvent fun onInventoryFullyOpened(event: InventoryFullyOpenedEvent) { if (!isEnabled()) return @@ -180,7 +182,14 @@ object TunnelsMaps { }.toMap() if (config.autoCommission) { clickTranslate.values.firstOrNull()?.let { + isCommission = true setActiveAndGoal(it) + } ?: run { + if (isCommission) { + active = "" + clearPath() + isCommission = false + } } } } @@ -198,6 +207,7 @@ object TunnelsMaps { if (!isEnabled()) return if (event.clickedButton != 1) return clickTranslate[event.slotId]?.let { + isCommission = true setActiveAndGoal(it) } } @@ -283,7 +293,8 @@ object TunnelsMaps { } addAll(locationDisplay) } - config.position.renderRenderables(display, posLabel = "TunnelsMaps") + config.position.renderRenderables(display, posLabel = "Tunnels Maps") + } private fun generateLocationsDisplay() = buildList { @@ -361,6 +372,7 @@ object TunnelsMaps { } private fun guiSetActive(it: String): () -> Unit = { + isCommission = false setActiveAndGoal(it) } |