aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/bingo
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/bingo')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt21
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/CollectionStep.kt4
2 files changed, 21 insertions, 4 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 35d318652..75c755de3 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt
@@ -1,6 +1,7 @@
package at.hannibal2.skyhanni.features.bingo
import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.api.CollectionAPI
import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.data.SkillExperience
import at.hannibal2.skyhanni.events.LorenzChatEvent
@@ -149,6 +150,16 @@ class BingoNextStepHelper {
updateResult()
}
}
+ if (step is CollectionStep) {
+ val counter = CollectionAPI.getCollectionCounter(step.collectionName)?.second ?: 0
+ if (step.amountHaving != counter) {
+ step.amountHaving = counter
+ if (counter >= step.amountNeeded) {
+ step.done()
+ }
+ updateResult()
+ }
+ }
}
}
@@ -288,7 +299,10 @@ class BingoNextStepHelper {
).apply { createItemIslandRequirement(itemName, this) }
redstoneForThys requires IslandType.DEEP_CAVERNS.getStep()
IslandType.DWARVEN_MINES.getStep() requires redstoneForThys
- IslandType.DWARVEN_MINES.getStep() requires SkillLevelStep("Mining", 12).also { it requires IslandType.THE_FARMING_ISLANDS.getStep() }
+ IslandType.DWARVEN_MINES.getStep() requires SkillLevelStep(
+ "Mining",
+ 12
+ ).also { it requires IslandType.THE_FARMING_ISLANDS.getStep() }
IslandType.CRYSTAL_HOLLOWS.getStep() requires IslandType.DWARVEN_MINES.getStep()
// TODO add skyblock level requirement
@@ -301,7 +315,10 @@ class BingoNextStepHelper {
IslandType.DWARVEN_MINES.getStep().also { finalSteps.add(it) }
ChatMessageStep("Get Ender Armor").also { finalSteps.add(it) } requires IslandType.THE_END.getStep()
- IslandType.THE_END.getStep() requires SkillLevelStep("Combat", 12).also { it requires IslandType.DEEP_CAVERNS.getStep() }
+ IslandType.THE_END.getStep() requires SkillLevelStep(
+ "Combat",
+ 12
+ ).also { it requires IslandType.DEEP_CAVERNS.getStep() }
// enchantedCharcoal(7)
// compactor(7)
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/CollectionStep.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/CollectionStep.kt
index 0ba7dbe8e..065f92f9b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/CollectionStep.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/CollectionStep.kt
@@ -2,5 +2,5 @@ package at.hannibal2.skyhanni.features.bingo.nextstep
import at.hannibal2.skyhanni.utils.NumberUtil
-class CollectionStep(val itemName: String, amountNeeded: Int) :
- NextStep(NumberUtil.format(amountNeeded) + " $itemName Collection") \ No newline at end of file
+class CollectionStep(val collectionName: String, amountNeeded: Int) :
+ ProgressionStep(NumberUtil.format(amountNeeded) + " $collectionName Collection", amountNeeded.toLong()) \ No newline at end of file