aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/mining
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/mining')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderChestReward.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt15
2 files changed, 12 insertions, 7 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderChestReward.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderChestReward.kt
index b2b449563..1a48a661a 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderChestReward.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderChestReward.kt
@@ -4,10 +4,6 @@ import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
enum class PowderChestReward(val displayName: String, pattern: String) {
- MITHRIL_POWDER(
- "§aMithril Powder",
- " {4}§r§2Mithril Powder(?: §r§8x(?<amount>.*))?",
- ),
GEMSTONE_POWDER(
"§dGemstone Powder",
" {4}§r§dGemstone Powder(?: §r§8x(?<amount>.*))?",
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt
index da9dbb2fb..38779224c 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt
@@ -199,7 +199,7 @@ object PowderTracker {
}
for (reward in PowderChestReward.entries) {
- if (reward == PowderChestReward.MITHRIL_POWDER || reward == PowderChestReward.GEMSTONE_POWDER) continue
+ if (reward == PowderChestReward.GEMSTONE_POWDER) continue
reward.chatPattern.matchMatcher(msg) {
tracker.modify {
val count = it.rewards[reward] ?: 0
@@ -217,7 +217,6 @@ object PowderTracker {
tracker.modify {
val reward = when (event.powder) {
HotmAPI.PowderType.GEMSTONE -> PowderChestReward.GEMSTONE_POWDER
- HotmAPI.PowderType.MITHRIL -> PowderChestReward.MITHRIL_POWDER
else -> return@modify
}
it.rewards.addOrPut(reward, event.amount)
@@ -275,6 +274,17 @@ object PowderTracker {
}
newList
}
+
+ event.transform(61, "mining.powderTracker.textFormat") { element ->
+ val newList = JsonArray()
+ for (entry in element.asJsonArray) {
+ if (entry is JsonNull) continue
+ if (entry.asString.let { it != "MITHRIL_POWDER" }) {
+ newList.add(entry)
+ }
+ }
+ newList
+ }
}
@SubscribeEvent
@@ -297,7 +307,6 @@ object PowderTracker {
private fun drawDisplay(data: Data): List<Searchable> = buildList {
calculate(data, gemstoneInfo, PowderChestReward.GEMSTONE_POWDER)
- calculate(data, mithrilInfo, PowderChestReward.MITHRIL_POWDER)
calculate(data, diamondEssenceInfo, PowderChestReward.DIAMOND_ESSENCE)
calculate(data, goldEssenceInfo, PowderChestReward.GOLD_ESSENCE)
calculateChest(data)