aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-25 04:15:44 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-25 04:15:44 +0100
commita2ff9d256b85e68b59c2c5f8a871d63b3e65d143 (patch)
tree7895c2f158edf5754d18278d311b377f0a2b24eb /src/main
parent7f86047e7f5565deab278ad2866a6d753c1816a0 (diff)
downloadskyhanni-a2ff9d256b85e68b59c2c5f8a871d63b3e65d143.tar.gz
skyhanni-a2ff9d256b85e68b59c2c5f8a871d63b3e65d143.tar.bz2
skyhanni-a2ff9d256b85e68b59c2c5f8a871d63b3e65d143.zip
made coin name and coin description independent functions v2
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt13
1 files changed, 8 insertions, 5 deletions
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 dc3398620..66357e1c0 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt
@@ -81,10 +81,12 @@ class SkyHanniItemTracker<Data : ItemTrackerData>(
val newDrop = itemProfit.lastTimeUpdated.passedSince() < 10.seconds && config.showRecentDrops
val numberColor = if (newDrop) "§a§l" else "§7"
- 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)
+ var displayName = if (hidden) {
+ "§8§m" + cleanName.removeColor(keepFormatting = true).replace("§r", "")
+ } else cleanName
+ displayName = " $numberColor${displayAmount.addSeparators()}x $displayName§7: §6$priceFormat"
+
+ val lore = buildLore(data, itemProfit, hidden, newDrop, internalName)
val renderable = if (isInventoryOpen()) Renderable.clickAndHover(displayName, lore) {
if (System.currentTimeMillis() > lastClickDelay + 150) {
@@ -116,7 +118,8 @@ class SkyHanniItemTracker<Data : ItemTrackerData>(
data: Data,
item: ItemTrackerData.TrackedItem,
hidden: Boolean,
- newDrop: Boolean
+ newDrop: Boolean,
+ internalName: NEUInternalName
) = buildList {
if (internalName == SKYBLOCK_COIN) {
addAll(data.getCoinDescription(item))