Skip to content

Commit

Permalink
fixed puzzle resets not updating failed puzzle amount
Browse files Browse the repository at this point in the history
  • Loading branch information
zealerker22 committed Jul 5, 2024
1 parent a6eff6d commit 22a9992
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import gg.skytils.skytilsmod.core.GuiManager
import gg.skytils.skytilsmod.core.structure.GuiElement
import gg.skytils.skytilsmod.core.tickTimer
import gg.skytils.skytilsmod.events.impl.MainReceivePacketEvent
import gg.skytils.skytilsmod.events.impl.skyblock.DungeonEvent
import gg.skytils.skytilsmod.features.impl.dungeons.DungeonFeatures.dungeonFloorNumber
import gg.skytils.skytilsmod.features.impl.handlers.MayorInfo
import gg.skytils.skytilsmod.listeners.DungeonListener
Expand Down Expand Up @@ -453,6 +454,12 @@ object ScoreCalculation {
}
}

@SubscribeEvent
fun onPuzzleReset(event: DungeonEvent.PuzzleEvent.Reset) {
missingPuzzles.set(missingPuzzles.get() + 1)
failedPuzzles.set((failedPuzzles.get() - 1).coerceAtLeast(0))
}

@SubscribeEvent(priority = EventPriority.LOWEST)
fun canYouPleaseStopCryingThanks(event: ClientChatReceivedEvent) {
if (!Utils.inDungeons || event.type != 0.toByte()) return
Expand Down

0 comments on commit 22a9992

Please sign in to comment.