diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-04-03 20:31:18 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-04-03 20:31:18 +0200 |
commit | 76be6ad6de39c7078550394e8ec24a494ddb3bcc (patch) | |
tree | 0a870475fa6ece58f31fdbc40c411cd2a16ee2e3 /src/main | |
parent | 7a6f576cbea6e37aeda014df40cfce69a0109a6c (diff) | |
download | skyhanni-76be6ad6de39c7078550394e8ec24a494ddb3bcc.tar.gz skyhanni-76be6ad6de39c7078550394e8ec24a494ddb3bcc.tar.bz2 skyhanni-76be6ad6de39c7078550394e8ec24a494ddb3bcc.zip |
renamed variable for consistency
Diffstat (limited to 'src/main')
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) } |