aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bingo/BingoAPI.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardTips.kt3
3 files changed, 8 insertions, 7 deletions
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 6941e7f57..340cd7d17 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoAPI.kt
@@ -19,4 +19,8 @@ object BingoAPI {
fun getIcon(searchRank: Int) = ranks.entries.find { it.value == searchRank }?.key
+ // We added the suffix (Community Goal) so that older skyhanni versions don't crash with the new repo data.
+ fun getCommunityTip(itemName: String) =
+ tips.filter { itemName.startsWith(it.key.split(" (Community Goal)")[0]) }.values.firstOrNull()
+
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt
index 183030790..f1bf2b5c3 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt
@@ -149,11 +149,9 @@ class BingoCardDisplay {
description: String,
done: Boolean
): CommunityGoal {
- if (!done) {
- if (description == "§7This goal will be revealed §7when it hits Tier IV.") {
- BingoAPI.tips[name]?.let {
- return CommunityGoal(name, it.getDescriptionLine(), false)
- }
+ if (description == "§7This goal will be revealed §7when it hits Tier IV.") {
+ BingoAPI.getCommunityTip(name)?.let {
+ return CommunityGoal(name, it.getDescriptionLine(), done)
}
}
return CommunityGoal(name, description, done)
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardTips.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardTips.kt
index 4ff74a309..54351750b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardTips.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardTips.kt
@@ -27,8 +27,7 @@ class BingoCardTips {
val toolTip = event.toolTip
val communityGoal = toolTip.getOrNull(1) == "§5§o§8Community Goal"
val bingoTip: BingoTip = if (communityGoal) {
- // We added the suffix (Community Goal) so that older skyhanni versions don't crash with the new repo data.
- BingoAPI.tips.filter { itemName.startsWith(it.key.split(" (Community Goal)")[0]) }.values.firstOrNull() ?: return
+ BingoAPI.getCommunityTip(itemName) ?: return
} else {
BingoAPI.tips[itemName] ?: return
}