diff options
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaFixChat.kt | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaFixChat.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaFixChat.kt index ebdb83bcf..e2e323933 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaFixChat.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaFixChat.kt @@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.ClickType import at.hannibal2.skyhanni.events.BurrowGuessEvent import at.hannibal2.skyhanni.events.ItemClickEvent +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.SecondPassedEvent import at.hannibal2.skyhanni.features.event.diana.DianaAPI.isDianaSpade import at.hannibal2.skyhanni.test.command.ErrorManager @@ -23,6 +24,7 @@ class DianaFixChat { private var lastParticleQualityPrompt = SimpleTimeMark.farPast() private var lastToggleMusicPrompt = SimpleTimeMark.farPast() private var errorCounter = 0 + private var successfulCounter = 0 private var lastSpadeUse = SimpleTimeMark.farPast() private var lastErrorTime = SimpleTimeMark.farPast() @@ -51,7 +53,9 @@ class DianaFixChat { private fun noGuessFound() { errorCounter++ if (errorCounter == 1) { - ChatUtils.chat("Could not find Diana Guess using sound and particles, please try again. (Was this a funny sound easter egg?)") + if (successfulCounter < 5) { + ChatUtils.chat("Could not find Diana Guess using sound and particles, please try again. (Was this a funny sound easter egg?)") + } return } @@ -86,7 +90,8 @@ class DianaFixChat { ErrorManager.logErrorStateWithData( "Could not find diana guess point", "diana guess point failed to load after /pq and /togglemusic", - "errorCounter" to errorCounter + "errorCounter" to errorCounter, + "successfulCounter" to successfulCounter, ) } } @@ -118,6 +123,12 @@ class DianaFixChat { hasSetParticleQuality = false hasSetToggleMusic = false errorCounter = 0 + successfulCounter++ + } + + @SubscribeEvent + fun onWorldChange(event: LorenzWorldChangeEvent) { + successfulCounter = 0 } private fun isEnabled() = DianaAPI.isDoingDiana() && config.burrowsSoopyGuess |