diff options
author | jani270 <69345714+jani270@users.noreply.github.com> | 2024-08-11 13:56:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-11 13:56:25 +0200 |
commit | 9b462cf711085dd0ac56131ded2e09ff2609bc45 (patch) | |
tree | 348c6dcde5b648a4f488b9ab431bff9cb0b1c5ed /src/main/java/at/hannibal2 | |
parent | 4482c2ac717340d6e80f24df9e4ac6cfb65a1d05 (diff) | |
download | skyhanni-9b462cf711085dd0ac56131ded2e09ff2609bc45.tar.gz skyhanni-9b462cf711085dd0ac56131ded2e09ff2609bc45.tar.bz2 skyhanni-9b462cf711085dd0ac56131ded2e09ff2609bc45.zip |
Improvement: Add Divan's Powder Coating to Estimated Item Value (#2317)
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt | 10 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt | 2 |
2 files changed, 12 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 ad00298c3..25fa85c03 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 @@ -44,6 +44,7 @@ import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getTransmissionTune import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.hasArtOfPeace import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.hasArtOfWar import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.hasBookOfStats +import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.hasDivanPowderCoating import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.hasEtherwarp import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.hasJalapenoBook import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.hasWoodSingularity @@ -74,6 +75,7 @@ object EstimatedItemValueCalculator { ::addJalapenoBook, ::addStatsBook, ::addEnrichment, + ::addDivanPowderCoating, // counted ::addMasterStars, @@ -305,6 +307,14 @@ object EstimatedItemValueCalculator { return price } + private fun addDivanPowderCoating(stack: ItemStack, list: MutableList<String>): Double { + if (!stack.hasDivanPowderCoating()) return 0.0 + + val price = "DIVAN_POWDER_COATING".asInternalName().getPrice() + list.add("§7Divan Powder Coating: §a§l✔ §7(§6" + price.shortFormat() + "§7)") + return price + } + private fun addArtOfWar(stack: ItemStack, list: MutableList<String>): Double { if (!stack.hasArtOfWar()) 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 7d38fa58b..b39493741 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt @@ -170,6 +170,8 @@ object SkyBlockItemModifierUtils { fun ItemStack.hasWoodSingularity() = getAttributeBoolean("wood_singularity_count") + fun ItemStack.hasDivanPowderCoating() = getAttributeBoolean("divan_powder_coating") + fun ItemStack.hasArtOfWar() = getAttributeBoolean("art_of_war_count") // TODO untested |