diff options
author | jani270 <69345714+jani270@users.noreply.github.com> | 2023-11-21 17:04:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-21 17:04:08 +0100 |
commit | c9dcfa040934df376e1bab2c893b466f2323829c (patch) | |
tree | 76c5a1ae7f435deea6916abe03a2f1a9ec036238 /src/main | |
parent | 4265f7c57aa4f31eb2b95c9c21a46c7bd0f02dc1 (diff) | |
download | skyhanni-c9dcfa040934df376e1bab2c893b466f2323829c.tar.gz skyhanni-c9dcfa040934df376e1bab2c893b466f2323829c.tar.bz2 skyhanni-c9dcfa040934df376e1bab2c893b466f2323829c.zip |
Added Bookworm Book to the Estimated Item Value feature (#722)
Added Bookworm Book to the Estimated Item Value feature. #722
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt | 11 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt | 2 |
2 files changed, 13 insertions, 0 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 93edf2416..f3e27957d 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 @@ -22,6 +22,7 @@ import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getAbilityScrolls import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getArmorDye import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getAttributes +import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getBookwormBookCount import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getDrillUpgrades import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getDungeonStarCount import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getEnchantments @@ -84,6 +85,7 @@ object EstimatedItemValueCalculator { totalPrice += addTransmissionTuners(stack, list) totalPrice += addManaDisintegrators(stack, list) totalPrice += addPolarvoidBook(stack, list) + totalPrice += addBookwormBook(stack, list) // cosmetic totalPrice += addHelmetSkin(stack, list) @@ -339,6 +341,15 @@ object EstimatedItemValueCalculator { return price } + private fun addBookwormBook(stack: ItemStack, list: MutableList<String>): Double { + val count = stack.getBookwormBookCount() ?: return 0.0 + + val tfHardcodedItemAgain = "BOOKWORM_BOOK".asInternalName() + val price = tfHardcodedItemAgain.getPrice() * count + list.add("§7Bookworm's Favorite Book: §e$count§7/§e5 §7(§6" + NumberUtil.format(price) + "§7)") + return price + } + private fun addSilex(stack: ItemStack, list: MutableList<String>): Double { val tier = stack.getSilexCount() ?: return 0.0 diff --git a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt index 8d600f70e..9f65a71f1 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt @@ -26,6 +26,8 @@ object SkyBlockItemModifierUtils { fun ItemStack.getPolarvoidBookCount() = getAttributeInt("polarvoid") + fun ItemStack.getBookwormBookCount() = getAttributeInt("bookworm_books") + fun ItemStack.getCultivatingCounter() = getAttributeLong("farmed_cultivating") fun ItemStack.getHoeCounter() = getAttributeLong("mined_crops") |