diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt | 7 |
1 files changed, 6 insertions, 1 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 a6895392a..fb6453add 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt @@ -75,12 +75,17 @@ class GardenCropMilestoneFix { tabListCropProgress[crop] = newValue } + private val loadedCrops = mutableListOf<CropType>() + private fun changedValue(crop: CropType, tabListValue: Long, source: String) { val calculated = crop.getCounter() val diff = calculated - tabListValue if (diff < -5_000) { crop.setCounter(tabListValue) - LorenzUtils.chat("§e[SkyHanni] Loaded ${crop.cropName} milestone data from $source!") + if (!loadedCrops.contains(crop)) { + LorenzUtils.chat("§e[SkyHanni] Loaded ${crop.cropName} milestone data from $source!") + loadedCrops.add(crop) + } } if (diff > 5_000) { LorenzUtils.debug("Fixed wrong ${crop.cropName} milestone data from $source: ${diff.addSeparators()}") |