aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-10-26 12:31:49 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-10-26 12:31:49 +0200
commit7b6d04e280a55edc7aed23f7d34c3ad19cb48687 (patch)
tree14485f20074a47c24aa08953440f6a486e639c3c /src/main
parentb6f9dc6caa77ef50e086fd50c6c32ebc69288eb8 (diff)
downloadskyhanni-7b6d04e280a55edc7aed23f7d34c3ad19cb48687.tar.gz
skyhanni-7b6d04e280a55edc7aed23f7d34c3ad19cb48687.tar.bz2
skyhanni-7b6d04e280a55edc7aed23f7d34c3ad19cb48687.zip
changed magmaFish from string to long
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt13
2 files changed, 9 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt
index c88a66bd2..1004f9759 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt
@@ -164,7 +164,7 @@ object SackAPI {
val info = TrophyFishManager.getInfo(trophyFishName)
val rarity = TrophyRarity.getByName(trophyRarityName) ?: TrophyRarity.BRONZE
val filletValue = (info?.getFilletValue(rarity) ?: 0) * stored.toLong()
- item.magmaFish = filletValue.toString()
+ item.magmaFish = filletValue
"MAGMA_FISH".asInternalName().sackPrice(filletValue.toString())
} else {
internalName.sackPrice(stored).coerceAtLeast(0)
@@ -328,7 +328,7 @@ object SackAPI {
var stored: String = "0",
var total: String = "0",
var price: Long = 0,
- var magmaFish: String = "0",
+ var magmaFish: Long = 0,
)
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt
index 7e1c50f1b..2a7498354 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt
@@ -79,6 +79,7 @@ object SackDisplay {
val amountShowing = if (config.itemToShow > sortedPairs.size) sortedPairs.size else config.itemToShow
newDisplay.addAsSingletonList("§7Items in Sacks: §o(Rendering $amountShowing of ${sortedPairs.size} items)")
for ((itemName, item) in sortedPairs) {
+
val (internalName, colorCode, stored, total, price, magmaFish) = item
totalPrice += price
if (rendered >= config.itemToShow) continue
@@ -102,15 +103,15 @@ object SackDisplay {
)
if (colorCode == "§a") add(" §c§l(Full!)")
- if (SackAPI.isTrophySack && magmaFish.toLong() > 0) {
- totalMagmaFish += magmaFish.toLong()
+ if (SackAPI.isTrophySack && magmaFish > 0) {
+ totalMagmaFish += magmaFish
add(
Renderable.hoverTips(
- " §7(§d${magmaFish.toLong()} ",
+ " §7(§d${magmaFish} ",
listOf(
- "§6Magmafish: §b${magmaFish.toLong().addSeparators()}",
- "§6Magmafish value: §b${price / magmaFish.toLong()}",
- "§6Magmafish per: §b${magmaFish.toLong() / stored.toLong()}"
+ "§6Magmafish: §b${magmaFish.addSeparators()}",
+ "§6Magmafish value: §b${price / magmaFish}",
+ "§6Magmafish per: §b${magmaFish / stored.toLong()}"
)
)