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/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