diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-29 13:13:25 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-29 13:13:25 +0200 |
commit | 31f951605026d989de2e94b135a58c996f2d9edd (patch) | |
tree | 8b1ea9ee9cf2ca6e6db01f8b038e4bbebb03cece /src/main/java/at/hannibal2 | |
parent | 00834cd15e9154018f9e1bb113355a119f1e9a80 (diff) | |
download | skyhanni-31f951605026d989de2e94b135a58c996f2d9edd.tar.gz skyhanni-31f951605026d989de2e94b135a58c996f2d9edd.tar.bz2 skyhanni-31f951605026d989de2e94b135a58c996f2d9edd.zip |
Code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/CropMoneyDisplay.kt | 9 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt | 4 |
2 files changed, 3 insertions, 10 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/CropMoneyDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/CropMoneyDisplay.kt index b3f20e353..bfc20a7cd 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/CropMoneyDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/CropMoneyDisplay.kt @@ -100,14 +100,7 @@ class CropMoneyDisplay { } var number = 0 - - -// val help = moneyPerHourData.map { it.key to it.value.max() } - val help = mutableMapOf<String, Double>() - for ((name, array) in moneyPerHourData) { - help[name] = array.max() - } - + val help = moneyPerHourData.mapValues { (_, value) -> value.max() } for (internalName in help.sortedDesc().keys) { number++ val cropName = cropNames[internalName]!! diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt index 8de0536f9..df71986ed 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt @@ -353,7 +353,7 @@ class GardenVisitorFeatures { for (name in visitorsInTab) { if (!visitors.containsKey(name)) { visitors[name] = Visitor(name, status = VisitorStatus.NEW) - println("new visitor '$name'") + LorenzUtils.debug("new visitor '$name'") if (config.visitorNotificationTitle) { SendTitleHelper.sendTitle("§eNew Visitor", 5_000) } @@ -429,7 +429,7 @@ class GardenVisitorFeatures { val old = oldValue[visitor] val new = visitor.status if (old == new) return - val name = visitor.visitorName + val name = visitor.visitorName.removeColor() LorenzUtils.debug("Visitor status change for $name: $old -> $new") } |