diff options
author | CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> | 2024-01-11 06:21:56 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-11 12:21:56 +0100 |
commit | 761788518c4ef295cb9ec108e0bc10af0d7e2d3e (patch) | |
tree | 5be1821e82b8935b99daa62e509559de0ea17ac8 /src/main/java/at/hannibal2/skyhanni/features/rift | |
parent | 90522ec07249ecca238083d66f17c61ccdae9481 (diff) | |
download | skyhanni-761788518c4ef295cb9ec108e0bc10af0d7e2d3e.tar.gz skyhanni-761788518c4ef295cb9ec108e0bc10af0d7e2d3e.tar.bz2 skyhanni-761788518c4ef295cb9ec108e0bc10af0d7e2d3e.zip |
use correct coroutine thing (#903)
Using SkyHanniMod.coroutineScope instead of CoroutineScope(Dispatchers.Default) #903
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/rift')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/DanceRoomHelper.kt | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/DanceRoomHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/DanceRoomHelper.kt index a2b337668..8f7457d7c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/DanceRoomHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/DanceRoomHelper.kt @@ -1,6 +1,8 @@ package at.hannibal2.skyhanni.features.rift.area.mirrorverse +import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator +import at.hannibal2.skyhanni.data.jsonobjects.repo.DanceRoomInstructionsJson import at.hannibal2.skyhanni.events.CheckRenderEntityEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzTickEvent @@ -12,9 +14,6 @@ import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.utils.LocationUtils.isPlayerInside import at.hannibal2.skyhanni.utils.RenderUtils.renderStrings import at.hannibal2.skyhanni.utils.StringUtils.firstLetterUppercase -import at.hannibal2.skyhanni.data.jsonobjects.repo.DanceRoomInstructionsJson -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Job import kotlinx.coroutines.delay import kotlinx.coroutines.isActive @@ -142,7 +141,7 @@ object DanceRoomHelper { val countdownString = "%01d:%03d".format(seconds, milliseconds) countdown = countdownString - CoroutineScope(Dispatchers.Default).launch { + SkyHanniMod.coroutineScope.launch { delay(1) var updatedSeconds = seconds var updatedMilliseconds = milliseconds - 1 @@ -170,7 +169,7 @@ object DanceRoomHelper { } fun start(interval: Long): Job { - return CoroutineScope(Dispatchers.Default).launch { + return SkyHanniMod.coroutineScope.launch { while (isActive && found) { index++ startCountdown(0, 500) |