aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/garden
diff options
context:
space:
mode:
authorDavid Cole <40234707+DavidArthurCole@users.noreply.github.com>2024-10-03 08:34:40 -0400
committerGitHub <noreply@github.com>2024-10-03 14:34:40 +0200
commit7efb11313d70c65b8df6692ed237f137d4d346d1 (patch)
tree206da44a87d03bb516041e59bcd692986c11475f /src/main/java/at/hannibal2/skyhanni/features/garden
parent4d4fbd019a58a694c0d36ae08d25a97c9db268d8 (diff)
downloadskyhanni-7efb11313d70c65b8df6692ed237f137d4d346d1.tar.gz
skyhanni-7efb11313d70c65b8df6692ed237f137d4d346d1.tar.bz2
skyhanni-7efb11313d70c65b8df6692ed237f137d4d346d1.zip
Backend: Detekt Fixes Part 5 (#2617)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/garden')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/AnitaMedalProfit.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerRngDropTracker.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingDirection.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneFeatures.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorCompactChat.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorAPI.kt2
8 files changed, 9 insertions, 10 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/AnitaMedalProfit.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/AnitaMedalProfit.kt
index 26e41f7ee..6cbda5b04 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/AnitaMedalProfit.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/AnitaMedalProfit.kt
@@ -38,7 +38,6 @@ object AnitaMedalProfit {
GOLD("§6Gold medal", 8),
SILVER("§fSilver medal", 2),
BRONZE("§cBronze medal", 1),
- ;
}
private fun getMedal(name: String) = MedalType.entries.firstOrNull { it.displayName == name }
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt
index 90c68a046..8a21525c1 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt
@@ -41,8 +41,9 @@ object ArmorDropTracker {
private var hasArmor = false
- private val tracker = SkyHanniTracker("Armor Drop Tracker", { Data() }, { it.garden.armorDropTracker })
- { drawDisplay(it) }
+ private val tracker = SkyHanniTracker("Armor Drop Tracker", { Data() }, { it.garden.armorDropTracker }) {
+ drawDisplay(it)
+ }
class Data : TrackerData() {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerRngDropTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerRngDropTracker.kt
index 9e9e3620b..af74da0d7 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerRngDropTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerRngDropTracker.kt
@@ -31,8 +31,9 @@ object DicerRngDropTracker {
private val itemDrops = mutableListOf<ItemDrop>()
private val config get() = GardenAPI.config.dicerCounters
- private val tracker = SkyHanniTracker("Dicer RNG Drop Tracker", { Data() }, { it.garden.dicerDropTracker })
- { drawDisplay(it) }
+ private val tracker = SkyHanniTracker("Dicer RNG Drop Tracker", { Data() }, { it.garden.dicerDropTracker }) {
+ drawDisplay(it)
+ }
class Data : TrackerData() {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingDirection.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingDirection.kt
index 6ce5ebe06..06ff155b6 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingDirection.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingDirection.kt
@@ -3,5 +3,4 @@ package at.hannibal2.skyhanni.features.garden.farming.lane
enum class FarmingDirection {
NORTH_SOUTH,
EAST_WEST,
- ;
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneFeatures.kt
index e407d0ad4..ce4ce6a9f 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneFeatures.kt
@@ -49,7 +49,6 @@ object FarmingLaneFeatures {
TOO_SLOW("§cToo slow!"),
CALCULATING("§aCalculating.."),
NORMAL(""),
- ;
}
@HandleEvent
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorCompactChat.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorCompactChat.kt
index 52e49d26f..8cafd5260 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorCompactChat.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorCompactChat.kt
@@ -56,7 +56,7 @@ object GardenVisitorCompactChat {
)
private var visitorAcceptedChat = mutableListOf<String>()
- private var visitorNameFormatted = "";
+ private var visitorNameFormatted = ""
private var rewardsList = mutableListOf<String>()
@SubscribeEvent
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt
index 152fc1b7c..2ad6f56b1 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt
@@ -196,7 +196,7 @@ object GardenVisitorDropStatistics {
for (reward in VisitorReward.entries) {
val count = rewardsCount[reward] ?: 0
- if (config.displayIcons) {// Icons
+ if (config.displayIcons) { // Icons
val stack = reward.itemStack
if (config.displayNumbersFirst)
add(listOf("§b${count.addSeparators()} ", stack))
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorAPI.kt
index d621aa081..1565d87d3 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorAPI.kt
@@ -201,7 +201,7 @@ object VisitorAPI {
val pricePerCopper = pricePerCopper ?: error("pricePerCopper is null")
val totalPrice = totalPrice ?: error("totalPrice is null")
val totalReward = totalReward ?: error("totalReward is null")
- val loss = totalPrice - totalReward;
+ val loss = totalPrice - totalReward
return when {
preventRefusing && hasReward() != null -> VisitorBlockReason.RARE_REWARD
preventRefusingNew && offersAccepted == 0 -> VisitorBlockReason.NEVER_ACCEPTED