diff options
author | Obsidian <108832807+Obsidianninja11@users.noreply.github.com> | 2023-09-09 01:01:44 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-09 11:01:44 +0200 |
commit | ae7a56d0b84b5da0bc2566402d4522fabcdaa767 (patch) | |
tree | 2362eda630caf8fafe6a93b015a5030e8c409bcb /src/main | |
parent | d7f8d561590efb1899eb78b203f067d0fa40bbe3 (diff) | |
download | skyhanni-ae7a56d0b84b5da0bc2566402d4522fabcdaa767.tar.gz skyhanni-ae7a56d0b84b5da0bc2566402d4522fabcdaa767.tar.bz2 skyhanni-ae7a56d0b84b5da0bc2566402d4522fabcdaa767.zip |
Added Bits, Mithril Powder, and Gemstone Powder to visitor drop statistics. (#456)
Made Visitor Drop Statistics great again #456
Diffstat (limited to 'src/main')
3 files changed, 35 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/GardenConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/GardenConfig.java index c8aa7e0d9..becc9377f 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/GardenConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/GardenConfig.java @@ -295,6 +295,11 @@ public class GardenConfig { "§b1 §cSpace Helmet", " ", // If they want another empty row "§212,735 Garden EXP", + "§b1 §9Cultivating I", + "§b1 §9Replenish I", + "§b11,056 Bits", + "§250,556 Mithril Powder", + "§d50,556 Gemstone Powder", } ) public List<Integer> textFormat = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12)); diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt index eabae9ee0..5c456e53a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt @@ -30,6 +30,9 @@ object GardenVisitorDropStatistics { private var copper = 0 private var gardenExp = 0 private var farmingExp = 0L + private var bits = 0 + private var mithrilPowder = 0 + private var gemstonePowder = 0 var coinsSpent = 0L var lastAccept = 0L @@ -38,6 +41,9 @@ object GardenVisitorDropStatistics { private val copperPattern = "[+](?<amount>.*) Copper".toPattern() private val gardenExpPattern = "[+](?<amount>.*) Garden Experience".toPattern() private val farmingExpPattern = "[+](?<amount>.*) Farming XP".toPattern() + private val bitsPattern = "[+](?<amount>.*) Bits".toPattern() + private val mithrilPowderPattern = "[+](?<amount>.*) Mithril Powder".toPattern() + private val gemstonePowderPattern = "[+](?<amount>.*) Gemstone Powder".toPattern() private var rewardsCount = mapOf<VisitorReward, Int>() private fun formatDisplay(map: List<List<Any>>): List<List<Any>> { @@ -76,6 +82,21 @@ object GardenVisitorDropStatistics { gardenExp += amount saveAndUpdate() } + bitsPattern.matchMatcher(message) { + val amount = group("amount").formatNumber().toInt() + bits += amount + saveAndUpdate() + } + mithrilPowderPattern.matchMatcher(message) { + val amount = group("amount").formatNumber().toInt() + mithrilPowder += amount + saveAndUpdate() + } + gemstonePowderPattern.matchMatcher(message) { + val amount = group("amount").formatNumber().toInt() + gemstonePowder += amount + saveAndUpdate() + } acceptPattern.matchMatcher(message) { setRarities(group("rarity")) saveAndUpdate() @@ -129,7 +150,7 @@ object GardenVisitorDropStatistics { //8 addAsSingletonList(format(coinsSpent, "Coins Spent", "§6", "")) - //9 – 14 + //9 – 16 for (reward in VisitorReward.entries) { val count = rewardsCount[reward] ?: 0 if (config.displayIcons) {// Icons @@ -141,10 +162,16 @@ object GardenVisitorDropStatistics { addAsSingletonList(format(count, reward.displayName, "§b")) } } - //15 + //17 addAsSingletonList("") - //16 + //18 addAsSingletonList(format(gardenExp, "Garden EXP", "§2", "§7")) + //19 + addAsSingletonList(format(bits, "Bits", "§b", "§b")) + //20 + addAsSingletonList(format(mithrilPowder, "Mithril Powder", "§2", "§2")) + //21 + addAsSingletonList(format(gemstonePowder, "Gemstone Powder", "§d", "§d")) } fun format(amount: Number, name: String, color: String, amountColor: String = color) = diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorReward.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorReward.kt index 123faaca7..81419939b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorReward.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorReward.kt @@ -9,8 +9,6 @@ enum class VisitorReward(val displayName: String, val internalName: String, val DEDICATION("§9Dedication IV", "DEDICATION;4", "Dedication (IV|4) Book".toPattern()), MUSIC_RUNE("§9Music Rune", "MUSIC_RUNE;1", "◆ Music Rune [1I]".toPattern()), SPACE_HELMET("§cSpace Helmet", "DCTR_SPACE_HELM", "Space Helmet".toPattern()), - - // Pretty sure that the symbol is ◆ but not 100% CULTIVATING( "§9Cultivating I", "CULTIVATING;1", "Cultivating ([I1]) Book".toPattern() |