diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-06-13 17:55:05 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-06-13 17:55:05 +0200 |
commit | 3c435a6e1cd268b5f4e26d3171738da893b68e66 (patch) | |
tree | 06232c9894b30d36d410183477bc1c561db44e4f /src/main/java/at | |
parent | 760052709058d4f2c92d4caf3233f5bb0d6773ea (diff) | |
download | skyhanni-3c435a6e1cd268b5f4e26d3171738da893b68e66.tar.gz skyhanni-3c435a6e1cd268b5f4e26d3171738da893b68e66.tar.bz2 skyhanni-3c435a6e1cd268b5f4e26d3171738da893b68e66.zip |
code cleanup
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt index 2cb5835e6..be83ff917 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt @@ -92,7 +92,7 @@ object EstimatedItemValueCalculator { ::addDrillUpgrades, ::addGemstoneSlotUnlockCost, ::addGemstones, - ::addEnchantments + ::addEnchantments, ) fun getTotalPrice(stack: ItemStack): Double = EstimatedItemValueCalculator.calculate(stack, mutableListOf()).first @@ -115,17 +115,13 @@ object EstimatedItemValueCalculator { genericName = kuudraSets.fold(internalName) { acc, part -> acc.replace(part, "GENERIC_KUUDRA") } } if (internalName == "ATTRIBUTE_SHARD" && attributes.size == 1) { - val price = - getPriceOrCompositePriceForAttribute( - "ATTRIBUTE_SHARD+ATTRIBUTE_" + attributes[0].first, - attributes[0].second - ) + val price = getPriceOrCompositePriceForAttribute( + "ATTRIBUTE_SHARD+ATTRIBUTE_" + attributes[0].first, + attributes[0].second, + ) if (price != null) { - list.add( - "§7Attribute §9${ - attributes[0].first.fixMending().allLettersFirstUppercase() - } ${attributes[0].second}§7: (§6${NumberUtil.format(price)}§7)" - ) + val name = attributes[0].first.fixMending().allLettersFirstUppercase() + list.add("§7Attribute §9$name ${attributes[0].second}§7: (§6${NumberUtil.format(price)}§7)",) return price } } @@ -163,7 +159,7 @@ object EstimatedItemValueCalculator { list.add( " $nameColor${ displayName.allLettersFirstUppercase() - } ${attr.second}§7: $priceColor${if (price != null) NumberUtil.format(price) else "Unknown"}" + } ${attr.second}§7: $priceColor${if (price != null) NumberUtil.format(price) else "Unknown"}", ) } // Adding 0.1 so that we always show the estimated item value overlay |