diff options
author | Luna <luna@alexia.lol> | 2024-07-15 20:16:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-15 20:16:36 +0200 |
commit | f9e0fbd23a8243b931a43f48818e8d76f8e0cbd7 (patch) | |
tree | 08d9044a4d6bfd05909d1f53c6977e7a850e2079 /src/main/java/at/hannibal2 | |
parent | 3875fd1658028708e6b990c45599142df8ec7d38 (diff) | |
download | skyhanni-f9e0fbd23a8243b931a43f48818e8d76f8e0cbd7.tar.gz skyhanni-f9e0fbd23a8243b931a43f48818e8d76f8e0cbd7.tar.bz2 skyhanni-f9e0fbd23a8243b931a43f48818e8d76f8e0cbd7.zip |
Backend: Remove redundant property from HotmAPI.Powder (#2128)
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/api/HotmAPI.kt | 6 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/HotmData.kt | 6 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/api/HotmAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/HotmAPI.kt index 38c901c85..39305a012 100644 --- a/src/main/java/at/hannibal2/skyhanni/api/HotmAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/api/HotmAPI.kt @@ -37,15 +37,13 @@ object HotmAPI { ; - val lowName = name.lowercase().firstLetterUppercase() - val heartPattern by RepoPattern.pattern( "inventory.${name.lowercase()}.heart", - "§7$lowName Powder: §a§.(?<powder>[\\d,]+)" + "§7$displayName Powder: §a§.(?<powder>[\\d,]+)" ) val resetPattern by RepoPattern.pattern( "inventory.${name.lowercase()}.reset", - "\\s+§8- §.(?<powder>[\\d,]+) $lowName Powder" + "\\s+§8- §.(?<powder>[\\d,]+) $displayName Powder" ) fun pattern(isHeart: Boolean) = if (isHeart) heartPattern else resetPattern diff --git a/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt b/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt index f3a2189b0..2d8ea9457 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt @@ -651,13 +651,13 @@ enum class HotmData( if (!LorenzUtils.inSkyBlock) return event.scoreboard.matchFirst(ScoreboardPattern.powderPattern) { - val type = HotmAPI.Powder.entries.firstOrNull { it.lowName == group("type") } ?: return + val type = HotmAPI.Powder.entries.firstOrNull { it.displayName == group("type") } ?: return val amount = group("amount").formatLong() val difference = amount - type.getCurrent() if (difference > 0) { type.gain(difference) - ChatUtils.debug("Gained §a${difference.addSeparators()} §e${type.lowName} Powder") + ChatUtils.debug("Gained §a${difference.addSeparators()} §e${type.displayName} Powder") } } } @@ -745,7 +745,7 @@ enum class HotmData( event.addIrrelevant { add("Tokens : $availableTokens/$tokens") HotmAPI.Powder.entries.forEach { - add("${it.lowName} Powder: ${it.getCurrent()}/${it.getTotal()}") + add("${it.displayName} Powder: ${it.getCurrent()}/${it.getTotal()}") } add("Ability: ${HotmAPI.activeMiningAbility?.printName}") add("Blue Egg: ${HotmAPI.isBlueEggActive}") |