aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-25 03:25:20 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-25 03:25:20 +0100
commitea84c154f07a805e61bab93ca3883bb727ce2080 (patch)
treee51c6d2cf164a52e89008373e5edc4807106f2c8 /src/main/java
parente47a2877bbb0550a1852889e0398f45bc20c0881 (diff)
downloadskyhanni-ea84c154f07a805e61bab93ca3883bb727ce2080.tar.gz
skyhanni-ea84c154f07a805e61bab93ca3883bb727ce2080.tar.bz2
skyhanni-ea84c154f07a805e61bab93ca3883bb727ce2080.zip
added missing empty char at start
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt10
3 files changed, 9 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt
index a6e8c2477..5f01183d6 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt
@@ -55,7 +55,7 @@ object FishingProfitTracker {
override fun getCoinFormat(item: TrackedItem, numberColor: String): Pair<String, List<String>> {
val mobKillCoinsFormat = NumberUtil.format(item.totalAmount)
val gained = item.timesGained
- val text = "$numberColor${gained}x §6Fished Coins§7: §6$mobKillCoinsFormat"
+ val text = " $numberColor${gained}x §6Fished Coins§7: §6$mobKillCoinsFormat"
val lore = listOf(
"§7Killing mobs gives you coins (more with scavenger)",
"§7You got §e$mobKillCoinsFormat §7coins in total this way"
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 938441d95..f77ae2121 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt
@@ -61,7 +61,7 @@ object SlayerProfitTracker {
override fun getCoinFormat(item: TrackedItem, numberColor: String): Pair<String, List<String>> {
val mobKillCoinsFormat = NumberUtil.format(item.totalAmount)
val gained = item.timesGained
- val text = "$numberColor${gained}x §6Mob Kill Coins§7: §6$mobKillCoinsFormat"
+ val text = " $numberColor${gained}x §6Mob Kill Coins§7: §6$mobKillCoinsFormat"
val lore = listOf(
"§7Killing mobs gives you coins (more with scavenger)",
"§7You got §6$mobKillCoinsFormat coins §7in total this way"
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt
index 3c33a408a..c84ab239a 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt
@@ -60,7 +60,7 @@ class SkyHanniItemTracker<Data : ItemTrackerData>(
lists: MutableList<List<Any>>
): Double {
var profit = 0.0
- val map = mutableMapOf<Renderable, Long>()
+ val items = mutableMapOf<Renderable, Long>()
for ((internalName, itemProfit) in data.items) {
if (!filter(internalName)) continue
@@ -69,11 +69,13 @@ class SkyHanniItemTracker<Data : ItemTrackerData>(
if (internalName == SKYBLOCK_COIN) 1.0 else data.getCustomPricePer(internalName)
val price = (pricePer * amount).toLong()
val displayAmount = if (internalName == SKYBLOCK_COIN) itemProfit.timesGained else amount
+
var name = if (internalName == SKYBLOCK_COIN) {
"§6Coins"
} else {
internalName.getItemStack().nameWithEnchantment ?: error("no name for $internalName")
}
+
val priceFormat = NumberUtil.format(price)
val hidden = itemProfit.hidden
val newDrop = itemProfit.lastTimeUpdated.passedSince() < 10.seconds && config.showRecentDrops
@@ -81,10 +83,12 @@ class SkyHanniItemTracker<Data : ItemTrackerData>(
if (hidden) {
name = "§8§m" + name.removeColor(keepFormatting = true).replace("§r", "")
}
+
val text = " $numberColor${displayAmount.addSeparators()}x $name§7: §6$priceFormat"
val (displayName, lore) = if (internalName == SKYBLOCK_COIN) {
data.getCoinFormat(itemProfit, numberColor)
} else text to buildLore(data, itemProfit, hidden, newDrop)
+
val renderable = if (isInventoryOpen()) Renderable.clickAndHover(displayName, lore) {
if (System.currentTimeMillis() > lastClickDelay + 150) {
if (KeyboardManager.isControlKeyDown()) {
@@ -105,12 +109,12 @@ class SkyHanniItemTracker<Data : ItemTrackerData>(
}
} else Renderable.string(displayName)
if (isInventoryOpen() || !hidden) {
- map[renderable] = price
+ items[renderable] = price
}
profit += price
}
- for (text in map.sortedDesc().keys) {
+ for (text in items.sortedDesc().keys) {
lists.addAsSingletonList(text)
}
return profit