From 037cac8b8d74b28bd68f8652525a10226af288a5 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Wed, 23 Aug 2023 12:06:58 +0200 Subject: renamed variables --- .../features/garden/inventory/AnitaExtraFarmingFortune.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/AnitaExtraFarmingFortune.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/AnitaExtraFarmingFortune.kt index a4cba3e35..a63caddcc 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/AnitaExtraFarmingFortune.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/AnitaExtraFarmingFortune.kt @@ -31,12 +31,12 @@ class AnitaExtraFarmingFortune { val anitaUpgrade = GardenAPI.config?.fortune?.anitaUpgrade ?: return - var amountFactor = 1.0 - val currentPrice = levelPrice[anitaUpgrade + 1] ?: return + var contributionFactor = 1.0 + val baseAmount = levelPrice[anitaUpgrade + 1]?.jacob_tickets ?: return for (line in event.toolTip) { "§5§o§aJacob's Ticket §8x(?.*)".toPattern().matchMatcher(line) { val realAmount = group("realAmount").formatNumber().toDouble() - amountFactor = realAmount / currentPrice.jacob_tickets + contributionFactor = realAmount / baseAmount } } @@ -48,7 +48,7 @@ class AnitaExtraFarmingFortune { jacobTickets += price.jacob_tickets } } - jacobTickets = (amountFactor * jacobTickets).toInt() + jacobTickets = (contributionFactor * jacobTickets).toInt() val index = event.toolTip.indexOfFirst("§5§o§eClick to trade!")?.let { it - 1 } ?: return -- cgit