diff options
author | CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> | 2024-06-07 13:06:59 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-07 13:06:59 +1000 |
commit | 239579b732e95562279af643527ee30b0858ee12 (patch) | |
tree | 81be1af1ebfd85685f51b5ce6f162d300ba8b2ab /src/main/java/at/hannibal2/skyhanni/features/garden | |
parent | 999ff2256c1384a5ca4db2e7069207127404cfff (diff) | |
download | skyhanni-239579b732e95562279af643527ee30b0858ee12.tar.gz skyhanni-239579b732e95562279af643527ee30b0858ee12.tar.bz2 skyhanni-239579b732e95562279af643527ee30b0858ee12.zip |
Backend: Remove deprecated function: getMultiplier (#1956)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/garden')
6 files changed, 14 insertions, 14 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt index f2cc5d31e..b154a72e0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt @@ -62,24 +62,24 @@ object GardenCropMilestoneFix { val amount = group("amount").toInt() val item = NEUInternalName.fromItemNameOrNull(group("item")) ?: return - val multiplier = NEUItems.getMultiplier(item) - val rawName = multiplier.first.itemNameWithoutColor + val primitiveStack = NEUItems.getPrimitiveMultiplier(item) + val rawName = primitiveStack.internalName.itemNameWithoutColor val cropType = CropType.getByNameOrNull(rawName) ?: return cropType.setCounter( - cropType.getCounter() + (amount * multiplier.second) + cropType.getCounter() + (amount * primitiveStack.amount) ) GardenCropMilestoneDisplay.update() } pestRareDropPattern.matchMatcher(event.message) { val item = NEUInternalName.fromItemNameOrNull(group("item")) ?: return - val multiplier = NEUItems.getMultiplier(item) - val rawName = multiplier.first.itemNameWithoutColor + val primitiveStack = NEUItems.getPrimitiveMultiplier(item) + val rawName = primitiveStack.internalName.itemNameWithoutColor val cropType = CropType.getByNameOrNull(rawName) ?: return cropType.setCounter( - cropType.getCounter() + multiplier.second + cropType.getCounter() + primitiveStack.amount ) GardenCropMilestoneDisplay.update() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropTimeCommand.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropTimeCommand.kt index 74269c52d..6423e00ae 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropTimeCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropTimeCommand.kt @@ -41,7 +41,7 @@ object GardenCropTimeCommand { val internalName = entry.key val itemName = internalName.itemName if (itemName.removeColor().lowercase().contains(searchName)) { - val (baseId, baseAmount) = NEUItems.getMultiplier(internalName) + val (baseId, baseAmount) = NEUItems.getPrimitiveMultiplier(internalName) val baseName = baseId.itemName val crop = CropType.getByName(baseName.removeColor()) diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropsInCommand.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropsInCommand.kt index 8523a7a58..11e307e88 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropsInCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropsInCommand.kt @@ -46,7 +46,7 @@ object GardenCropsInCommand { val internalName = entry.key val itemName = internalName.itemName if (itemName.removeColor().lowercase().contains(searchName)) { - val (baseId, baseAmount) = NEUItems.getMultiplier(internalName) + val (baseId, baseAmount) = NEUItems.getPrimitiveMultiplier(internalName) val baseName = baseId.itemName val crop = CropType.getByName(baseName.removeColor()) diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt index 9d0bc6952..701082d63 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt @@ -579,7 +579,7 @@ object ComposterOverlay { || internalName == "SIMPLE_CARROT_CANDY" ) continue - var (newId, amount) = NEUItems.getMultiplier(internalName.asInternalName()) + var (newId, amount) = NEUItems.getPrimitiveMultiplier(internalName.asInternalName()) if (amount <= 9) continue if (internalName == "ENCHANTED_HUGE_MUSHROOM_1" || internalName == "ENCHANTED_HUGE_MUSHROOM_2") { // 160 * 8 * 4 is 5120 and not 5184, but hypixel made an error, so we have to copy the error diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt index 987ab0ed8..40509d97c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt @@ -361,7 +361,7 @@ object CropMoneyDisplay { if (debug) { debugList.addAsSingletonList(" added seedsPerHour: $seedsPerHour") } - val factor = NEUItems.getMultiplier(internalName).second + val factor = NEUItems.getPrimitiveMultiplier(internalName).amount npcPrice += "SEEDS".asInternalName().getNpcPrice() * seedsPerHour / factor sellOffer += it.buyPrice * seedsPerHour instantSell += it.sellPrice * seedsPerHour @@ -421,7 +421,7 @@ object CropMoneyDisplay { val internalName = rawInternalName.asInternalName() if (!internalName.isBazaarItem()) continue - val (newId, amount) = NEUItems.getMultiplier(internalName) + val (newId, amount) = NEUItems.getPrimitiveMultiplier(internalName) val itemName = newId.itemNameWithoutColor val crop = getByNameOrNull(itemName) crop?.let { diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt index 921583492..ccac68803 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt @@ -427,12 +427,12 @@ object GardenVisitorFeatures { finalList[index] = "$formattedLine §7(§6$format§7)" } if (!readingShoppingList) continue - val multiplier = NEUItems.getMultiplier(internalName) + val primitiveStack = NEUItems.getPrimitiveMultiplier(internalName) - val rawName = multiplier.first.itemNameWithoutColor + val rawName = primitiveStack.internalName.itemNameWithoutColor val cropType = getByNameOrNull(rawName) ?: continue - val cropAmount = multiplier.second.toLong() * amount + val cropAmount = primitiveStack.amount.toLong() * amount val formattedName = "§e${cropAmount.addSeparators()}§7x ${cropType.cropName} " val formattedSpeed = cropType.getSpeed()?.let { speed -> val duration = (cropAmount / speed).seconds |