diff options
Diffstat (limited to 'src')
4 files changed, 13 insertions, 11 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt index aa15461f5..7c41245fc 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt @@ -12,7 +12,7 @@ import com.google.gson.JsonPrimitive object ConfigUpdaterMigrator { val logger = LorenzLogger("ConfigMigration") - const val CONFIG_VERSION = 60 + const val CONFIG_VERSION = 61 fun JsonElement.at(chain: List<String>, init: Boolean): JsonElement? { if (chain.isEmpty()) return this if (this !is JsonObject) return null diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/mining/PowderTrackerConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/mining/PowderTrackerConfig.java index 1c32cabc2..247da9b54 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/mining/PowderTrackerConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/mining/PowderTrackerConfig.java @@ -24,7 +24,6 @@ import static at.hannibal2.skyhanni.config.features.mining.PowderTrackerConfig.P import static at.hannibal2.skyhanni.config.features.mining.PowderTrackerConfig.PowderDisplayEntry.GOLD_ESSENCE; import static at.hannibal2.skyhanni.config.features.mining.PowderTrackerConfig.PowderDisplayEntry.HARD_STONE; import static at.hannibal2.skyhanni.config.features.mining.PowderTrackerConfig.PowderDisplayEntry.JADE; -import static at.hannibal2.skyhanni.config.features.mining.PowderTrackerConfig.PowderDisplayEntry.MITHRIL_POWDER; import static at.hannibal2.skyhanni.config.features.mining.PowderTrackerConfig.PowderDisplayEntry.ROBOTRON; import static at.hannibal2.skyhanni.config.features.mining.PowderTrackerConfig.PowderDisplayEntry.RUBY; import static at.hannibal2.skyhanni.config.features.mining.PowderTrackerConfig.PowderDisplayEntry.SAPPHIRE; @@ -56,7 +55,6 @@ public class PowderTrackerConfig { public Property<List<PowderDisplayEntry>> textFormat = Property.of(new ArrayList<>(Arrays.asList( TOTAL_CHESTS, DOUBLE_POWDER, - MITHRIL_POWDER, GEMSTONE_POWDER, SPACER_1, DIAMOND_ESSENCE, @@ -78,7 +76,6 @@ public class PowderTrackerConfig { public enum PowderDisplayEntry implements HasLegacyId { TOTAL_CHESTS("§d852 Total chests Picked §7(950/h)", 2), DOUBLE_POWDER("§bx2 Powder: §aActive!", 3), - MITHRIL_POWDER("§b250,420 §aMithril Powder §7(350,000/h)", 4), GEMSTONE_POWDER("§b250,420 §dGemstone Powder §7(350,000/h)", 5), SPACER_1("", 6), DIAMOND_ESSENCE("§b129 §bDiamond Essence §7(600/h)", 7), 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) |