aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/combat/endernodetracker/EnderNodeTracker.kt18
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerRngDropTracker.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt10
3 files changed, 16 insertions, 16 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/endernodetracker/EnderNodeTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/endernodetracker/EnderNodeTracker.kt
index 4d893ab9a..a8ccc5a85 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/combat/endernodetracker/EnderNodeTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/combat/endernodetracker/EnderNodeTracker.kt
@@ -165,7 +165,7 @@ object EnderNodeTracker {
}
}
- private fun calculateProfit(storage: Data): Map<EnderNode, Double> {
+ private fun getLootProfit(storage: Data): Map<EnderNode, Double> {
if (!ProfileStorageData.loaded) return emptyMap()
val newProfit = mutableMapOf<EnderNode, Double>()
@@ -209,34 +209,34 @@ object EnderNodeTracker {
else -> null
}
- private fun drawDisplay(storage: Data) = buildList<List<Any>> {
- val lootProfit = calculateProfit(storage)
+ private fun drawDisplay(data: Data) = buildList<List<Any>> {
+ val lootProfit = getLootProfit(data)
addAsSingletonList("§5§lEnder Node Tracker")
- addAsSingletonList("§d${storage.totalNodesMined.addSeparators()} Ender Nodes mined")
+ addAsSingletonList("§d${data.totalNodesMined.addSeparators()} Ender Nodes mined")
addAsSingletonList("§6${format(lootProfit.values.sum())} Coins made")
addAsSingletonList(" ")
- addAsSingletonList("§b${storage.totalEndermiteNests.addSeparators()} §cEndermite Nest")
+ addAsSingletonList("§b${data.totalEndermiteNests.addSeparators()} §cEndermite Nest")
for (item in EnderNode.entries.subList(0, 11)) {
- val count = (storage.lootCount[item] ?: 0).addSeparators()
+ val count = (data.lootCount[item] ?: 0).addSeparators()
val profit = format(lootProfit[item] ?: 0.0)
addAsSingletonList("§b$count ${item.displayName} §7(§6$profit§7)")
}
addAsSingletonList(" ")
- val totalEnderArmor = calculateEnderArmor(storage)
+ val totalEnderArmor = calculateEnderArmor(data)
addAsSingletonList(
"§b${totalEnderArmor.addSeparators()} §5Ender Armor " +
"§7(§6${format(totalEnderArmor * 10_000)}§7)"
)
for (item in EnderNode.entries.subList(11, 16)) {
- val count = (storage.lootCount[item] ?: 0).addSeparators()
+ val count = (data.lootCount[item] ?: 0).addSeparators()
val profit = format(lootProfit[item] ?: 0.0)
addAsSingletonList("§b$count ${item.displayName} §7(§6$profit§7)")
}
// enderman pet rarities
- val (c, u, r, e, l) = EnderNode.entries.subList(16, 21).map { (storage.lootCount[it] ?: 0).addSeparators() }
+ val (c, u, r, e, l) = EnderNode.entries.subList(16, 21).map { (data.lootCount[it] ?: 0).addSeparators() }
val profit = format(EnderNode.entries.subList(16, 21).sumOf { lootProfit[it] ?: 0.0 })
addAsSingletonList("§f$c§7-§a$u§7-§9$r§7-§5$e§7-§6$l §fEnderman Pet §7(§6$profit§7)")
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerRngDropTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerRngDropTracker.kt
index b62eeb56b..49d38d7ba 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerRngDropTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerRngDropTracker.kt
@@ -109,9 +109,9 @@ object DicerRngDropTracker {
}
}
- private fun drawDisplay(storage: Data) = buildList<List<Any>> {
+ private fun drawDisplay(data: Data) = buildList<List<Any>> {
val cropInHand = cropInHand ?: return@buildList
- val items = storage.drops.getOrPut(cropInHand) { mutableMapOf() }
+ val items = data.drops.getOrPut(cropInHand) { mutableMapOf() }
addAsSingletonList("§7Dicer RNG Drop Tracker for $toolName§7:")
for ((rarity, amount) in items.sortedDesc()) {
val displayName = rarity.displayName
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt
index c28441c33..10515d7aa 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt
@@ -167,12 +167,12 @@ object SlayerProfitTracker {
return internalName in allowedList
}
- private fun drawDisplay(itemLog: Data) = buildList<List<Any>> {
+ private fun drawDisplay(data: Data) = buildList<List<Any>> {
val tracker = getTracker() ?: return@buildList
addAsSingletonList("§e§l$itemLogCategory Profit Tracker")
- var profit = tracker.drawItems(itemLog, { true }, this)
- val slayerSpawnCost = itemLog.slayerSpawnCost
+ var profit = tracker.drawItems(data, { true }, this)
+ val slayerSpawnCost = data.slayerSpawnCost
if (slayerSpawnCost != 0L) {
val mobKillCoinsFormat = NumberUtil.format(slayerSpawnCost)
addAsSingletonList(
@@ -184,7 +184,7 @@ object SlayerProfitTracker {
profit += slayerSpawnCost
}
- val slayerCompletedCount = itemLog.slayerCompletedCount
+ val slayerCompletedCount = data.slayerCompletedCount
addAsSingletonList(
Renderable.hoverTips(
"§7Bosses killed: §e${slayerCompletedCount.addSeparators()}",
@@ -192,7 +192,7 @@ object SlayerProfitTracker {
)
)
- addAsSingletonList(tracker.addTotalProfit(profit, itemLog.slayerCompletedCount, "boss"))
+ addAsSingletonList(tracker.addTotalProfit(profit, data.slayerCompletedCount, "boss"))
tracker.addPriceFromButton(this)
}