aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/mining
diff options
context:
space:
mode:
authorDavid Cole <40234707+DavidArthurCole@users.noreply.github.com>2024-10-11 12:42:33 -0400
committerGitHub <noreply@github.com>2024-10-11 18:42:33 +0200
commit7c2d4ed566246513bc438272e436627412147d62 (patch)
treeedf8d3d01a49bd7c4f5993bae6367613c32fcaac /src/main/java/at/hannibal2/skyhanni/features/mining
parent0671e35163d55ab0f940aa6806a0d7bfb2876429 (diff)
downloadskyhanni-7c2d4ed566246513bc438272e436627412147d62.tar.gz
skyhanni-7c2d4ed566246513bc438272e436627412147d62.tar.bz2
skyhanni-7c2d4ed566246513bc438272e436627412147d62.zip
Backend: Detekt Fixes Part 6 (#2657)
Co-authored-by: Cal <cwolfson58@gmail.com> Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/mining')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/mining/TunnelsMaps.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseTracker.kt10
2 files changed, 13 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/TunnelsMaps.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/TunnelsMaps.kt
index ad2baedbe..0012ed8b0 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/mining/TunnelsMaps.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/mining/TunnelsMaps.kt
@@ -366,9 +366,11 @@ object TunnelsMaps {
private fun toCompactGemstoneName(it: Map.Entry<String, List<GraphNode>>): Renderable = Renderable.clickAndHover(
Renderable.string(
- (it.key.getFirstColorCode()?.let { "§$it" } ?: "") + ("ROUGH_".plus(
- it.key.removeColor().removeSuffix("stone"),
- ).asInternalName().itemName.takeWhile { it != ' ' }.removeColor()),
+ (it.key.getFirstColorCode()?.let { "§$it" } ?: "") + (
+ "ROUGH_".plus(
+ it.key.removeColor().removeSuffix("stone"),
+ ).asInternalName().itemName.takeWhile { it != ' ' }.removeColor()
+ ),
horizontalAlign = RenderUtils.HorizontalAlignment.CENTER,
),
tips = listOf(it.key),
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseTracker.kt
index 3e81a01a9..bc5e32440 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseTracker.kt
@@ -45,7 +45,11 @@ object CorpseTracker {
}
override fun getDescription(timesGained: Long): List<String> {
- val divisor = 1.coerceAtLeast(getSelectedBucket()?.let { corpsesLooted[it]?.toInt() } ?: corpsesLooted.sumAllValues().toInt())
+ val divisor = 1.coerceAtLeast(
+ getSelectedBucket()?.let {
+ corpsesLooted[it]?.toInt()
+ } ?: corpsesLooted.sumAllValues().toInt()
+ )
val percentage = timesGained.toDouble() / divisor
val dropRate = LorenzUtils.formatPercentage(percentage.coerceAtMost(1.0))
return listOf(
@@ -85,7 +89,9 @@ object CorpseTracker {
if (bucketData.getCorpseCount() == 0L) return@buildList
var profit = tracker.drawItems(bucketData, { true }, this)
- val applicableKeys: List<CorpseType> = bucketData.getSelectedBucket()?.let { listOf(it) } ?: enumValues<CorpseType>().toList()
+ val applicableKeys: List<CorpseType> = bucketData.getSelectedBucket()?.let {
+ listOf(it)
+ } ?: enumValues<CorpseType>().toList()
.filter { bucketData.corpsesLooted[it] != null }
var totalKeyCost = 0.0
var totalKeyCount = 0