diff options
author | steini225 <32608974+steini225@users.noreply.github.com> | 2023-04-10 20:04:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-10 20:04:53 +0200 |
commit | bc33d91ec58ecd4dd782485c48385dfad79522c2 (patch) | |
tree | b7275fe63ec15654562b3af9508c1af72eb69d37 /src/main/java/at | |
parent | b814edd6e6d8d615e02191ddd3a7085ee81bf38f (diff) | |
download | skyhanni-bc33d91ec58ecd4dd782485c48385dfad79522c2.tar.gz skyhanni-bc33d91ec58ecd4dd782485c48385dfad79522c2.tar.bz2 skyhanni-bc33d91ec58ecd4dd782485c48385dfad79522c2.zip |
bingo_topaz (#30)
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt index 791680545..2423ed85d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt @@ -10,6 +10,7 @@ import at.hannibal2.skyhanni.features.bingo.nextstep.* import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.StringUtils.matchRegex import at.hannibal2.skyhanni.utils.StringUtils.removeColor import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import net.minecraftforge.fml.common.gameevent.TickEvent @@ -118,11 +119,27 @@ class BingoNextStepHelper { } } + var nextMessageIsCrystal = false + @SubscribeEvent fun onChat(event: LorenzChatEvent) { if (!LorenzUtils.isBingoProfile) return if (!SkyHanniMod.feature.bingo.cardDisplay) return + for (currentStep in currentSteps) { + if (currentStep.displayName == "Obtain a Topaz Crystal") { + if (event.message.matchRegex(" *§r§5§l✦ CRYSTAL FOUND §r§7\\(.§r§7/5§r§7\\)")) { + nextMessageIsCrystal = true + return + } + if (nextMessageIsCrystal) { + nextMessageIsCrystal = false + if (event.message.matchRegex(" *§r§eTopaz Crystal")) { + currentStep.done() + } + } + } + } //TODO add thys message // if (event.message == "thys message") { // thys.done() @@ -189,7 +206,7 @@ class BingoNextStepHelper { } private fun update() { - val personalGoals = BingoCardDisplay.personalGoals + val personalGoals = BingoCardDisplay.personalGoals.filter { !it.done } if (personalGoals.isEmpty()) { if (!dirty) { reset() |