aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-06-14 16:14:12 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-06-14 16:14:12 +0200
commit656650a47e2094e800929bb4ba156d8a752da8cf (patch)
tree891e58553e297e8963ff05f175f4e437f347c0e4 /src/main/java/at/hannibal2/skyhanni/features
parent6e5812ab39d687659592360547fbcf550398b78c (diff)
downloadskyhanni-656650a47e2094e800929bb4ba156d8a752da8cf.tar.gz
skyhanni-656650a47e2094e800929bb4ba156d8a752da8cf.tar.bz2
skyhanni-656650a47e2094e800929bb4ba156d8a752da8cf.zip
fixed wrong/funny/wtf names
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt31
1 files changed, 16 insertions, 15 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 fa4dc9006..789fc30eb 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
@@ -95,6 +95,15 @@ object EstimatedItemValueCalculator {
::addEnchantments,
)
+ val farmingForDummies = "FARMING_FOR_DUMMIES".asInternalName()
+ val etherwarpConduit = "ETHERWARP_CONDUIT".asInternalName()
+ val etherwarpMerger = "ETHERWARP_MERGER".asInternalName()
+ val fumingPotatoBook = "FUMING_POTATO_BOOK".asInternalName()
+ val hotPotatoBook = "HOT_POTATO_BOOK".asInternalName()
+ val silex = "SIL_EX".asInternalName()
+ val transmissionTuner = "TRANSMISSION_TUNER".asInternalName()
+ val manaDisintegrator = "MANA_DISINTEGRATOR".asInternalName()
+
fun getTotalPrice(stack: ItemStack): Double = EstimatedItemValueCalculator.calculate(stack, mutableListOf()).first
fun calculate(stack: ItemStack, list: MutableList<String>): Pair<Double, Double> {
@@ -279,9 +288,7 @@ object EstimatedItemValueCalculator {
private fun addEtherwarp(stack: ItemStack, list: MutableList<String>): Double {
if (!stack.hasEtherwarp()) return 0.0
- val wtfHardcodedConduit = "ETHERWARP_CONDUIT".asInternalName()
- val wtfHardcodedMerger = "ETHERWARP_MERGER".asInternalName()
- val price = wtfHardcodedConduit.getPrice() + wtfHardcodedMerger.getPrice()
+ val price = etherwarpConduit.getPrice() + etherwarpMerger.getPrice()
list.add("§7Etherwarp: §a§l✔ §7(§6" + price.shortFormat() + "§7)")
return price
}
@@ -334,14 +341,12 @@ object EstimatedItemValueCalculator {
var totalPrice = 0.0
- val wtfHardcodedHpb = "HOT_POTATO_BOOK".asInternalName()
- val hpbPrice = wtfHardcodedHpb.getPrice() * hpb
+ val hpbPrice = hotPotatoBook.getPrice() * hpb
list.add("§7HPB's: §e$hpb§7/§e10 §7(§6" + hpbPrice.shortFormat() + "§7)")
totalPrice += hpbPrice
if (fuming > 0) {
- val wtfHardcodedFuming = "FUMING_POTATO_BOOK".asInternalName()
- val fumingPrice = wtfHardcodedFuming.getPrice() * fuming
+ val fumingPrice = fumingPotatoBook.getPrice() * fuming
list.add("§7Fuming: §e$fuming§7/§e5 §7(§6" + fumingPrice.shortFormat() + "§7)")
totalPrice += fumingPrice
}
@@ -352,8 +357,7 @@ object EstimatedItemValueCalculator {
private fun addFarmingForDummies(stack: ItemStack, list: MutableList<String>): Double {
val count = stack.getFarmingForDummiesCount() ?: return 0.0
- val wtfHardcodedDumbFarmers = "FARMING_FOR_DUMMIES".asInternalName()
- val price = wtfHardcodedDumbFarmers.getPrice() * count
+ val price = farmingForDummies.getPrice() * count
list.add("§7Farming for Dummies: §e$count§7/§e5 §7(§6" + price.shortFormat() + "§7)")
return price
}
@@ -382,8 +386,7 @@ object EstimatedItemValueCalculator {
val internalName = stack.getInternalName()
val maxTier = if (internalName == "STONK_PICKAXE".asInternalName()) 4 else 5
- val wtfHardcodedSilex = "SIL_EX".asInternalName()
- val price = wtfHardcodedSilex.getPrice() * tier
+ val price = silex.getPrice() * tier
list.add("§7Silex: §e$tier§7/§e$maxTier §7(§6" + price.shortFormat() + "§7)")
return price
}
@@ -391,8 +394,7 @@ object EstimatedItemValueCalculator {
private fun addTransmissionTuners(stack: ItemStack, list: MutableList<String>): Double {
val count = stack.getTransmissionTunerCount() ?: return 0.0
- val wtfHardcodedTuner = "TRANSMISSION_TUNER".asInternalName()
- val price = wtfHardcodedTuner.getPrice() * count
+ val price = transmissionTuner.getPrice() * count
list.add("§7Transmission Tuners: §e$count§7/§e4 §7(§6" + price.shortFormat() + "§7)")
return price
}
@@ -400,8 +402,7 @@ object EstimatedItemValueCalculator {
private fun addManaDisintegrators(stack: ItemStack, list: MutableList<String>): Double {
val count = stack.getManaDisintegrators() ?: return 0.0
- val wtfHardcodedTuner = "MANA_DISINTEGRATOR".asInternalName()
- val price = wtfHardcodedTuner.getPrice() * count
+ val price = manaDisintegrator.getPrice() * count
list.add("§7Mana Disintegrators: §e$count§7/§e10 §7(§6" + price.shortFormat() + "§7)")
return price
}