From d1f0d9de8a38fe41b5f931a6115853bf6b4f9191 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 19 Feb 2024 12:52:14 +0100 Subject: Hide Garden Composter reminders while participating in a Farming Contest. --- .../skyhanni/features/garden/composter/ComposterDisplay.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main') diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterDisplay.kt index 2e8ca1d11..9436115ad 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterDisplay.kt @@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.features.garden.composter import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.TabListUpdateEvent +import at.hannibal2.skyhanni.features.fame.ReminderUtils import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.CollectionUtils.addAsSingletonList @@ -116,6 +117,8 @@ class ComposterDisplay { private fun sendNotify() { if (!config.notifyLow.enabled) return + if (!ReminderUtils.isBusy()) return + val storage = storage ?: return if (ComposterAPI.getOrganicMatter() <= config.notifyLow.organicMatter && System.currentTimeMillis() >= storage.informedAboutLowMatter) { @@ -174,8 +177,7 @@ class ComposterDisplay { if (!config.warnAlmostClose) return val storage = GardenAPI.storage ?: return - if (LorenzUtils.inDungeons) return - if (LorenzUtils.inKuudraFight) return + if (!ReminderUtils.isBusy()) return if (System.currentTimeMillis() < storage.lastComposterEmptyWarningTime + 1000 * 60 * 2) return storage.lastComposterEmptyWarningTime = System.currentTimeMillis() -- cgit