aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-12-08 23:15:16 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-12-08 23:15:16 +0100
commitb71903136f12b4c77fcf43f9c47abdbf050ac6ad (patch)
treed860abc6d37493d4a467f12f555aeb23d5063cf2 /src/main/java/at
parentcfee6ce21b0d1a963b83517056a3edec86609174 (diff)
downloadskyhanni-b71903136f12b4c77fcf43f9c47abdbf050ac6ad.tar.gz
skyhanni-b71903136f12b4c77fcf43f9c47abdbf050ac6ad.tar.bz2
skyhanni-b71903136f12b4c77fcf43f9c47abdbf050ac6ad.zip
Saving minion craft helper crafted tier 1 minions per bingo session.
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/Storage.java3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bingo/BingoAPI.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt8
3 files changed, 5 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/Storage.java b/src/main/java/at/hannibal2/skyhanni/config/Storage.java
index d3796b767..3c47ecf9a 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/Storage.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/Storage.java
@@ -99,6 +99,9 @@ public class Storage {
public static class BingoProfile {
@Expose
+ public List<String> tierOneMinionsDone = new ArrayList<>();
+
+ @Expose
public Map<Integer, BingoGoal> goals = new HashMap<>();
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoAPI.kt
index dfc910ba3..70ff89127 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoAPI.kt
@@ -44,7 +44,7 @@ object BingoAPI {
tips[displayName]
}
- private val bingoStorage: BingoProfile by lazy {
+ val bingoStorage: BingoProfile by lazy {
val playerSpecific = ProfileStorageData.playerSpecific ?: error("playerSpecific is null")
playerSpecific.bingoProfiles.getOrPut(getStartOfMonthInMillis()) { BingoProfile() }
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt
index 4428fd072..c4db6c1f6 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt
@@ -5,7 +5,6 @@ import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
-import at.hannibal2.skyhanni.events.ProfileJoinEvent
import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName_old
import at.hannibal2.skyhanni.utils.ItemUtils.hasEnchantments
import at.hannibal2.skyhanni.utils.ItemUtils.name
@@ -32,7 +31,7 @@ class MinionCraftHelper {
private var hasMinionInInventory = false
private var hasItemsForMinion = false
private val tierOneMinions = mutableListOf<String>()
- private val tierOneMinionsDone = mutableListOf<String>()
+ private val tierOneMinionsDone get() = BingoAPI.bingoStorage.tierOneMinionsDone
private val allIngredients = mutableListOf<String>()
private val alreadyNotified = mutableListOf<String>()
@@ -85,11 +84,6 @@ class MinionCraftHelper {
return newDisplay
}
- @SubscribeEvent
- fun onProfileJoin(event: ProfileJoinEvent) {
- tierOneMinionsDone.clear()
- }
-
private fun loadFromInventory(mainInventory: Array<ItemStack?>): Pair<MutableMap<String, String>, MutableMap<String, Int>> {
init()