diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-02-19 12:52:14 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-02-19 12:52:14 +0100 |
commit | d1f0d9de8a38fe41b5f931a6115853bf6b4f9191 (patch) | |
tree | 7d476dde7098f59a3e1e1c60c66f7334cb458e73 | |
parent | 97ab3476c490b2b035d1dafebbc47e27c1ecc176 (diff) | |
download | skyhanni-d1f0d9de8a38fe41b5f931a6115853bf6b4f9191.tar.gz skyhanni-d1f0d9de8a38fe41b5f931a6115853bf6b4f9191.tar.bz2 skyhanni-d1f0d9de8a38fe41b5f931a6115853bf6b4f9191.zip |
Hide Garden Composter reminders while participating in a Farming Contest.
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterDisplay.kt | 6 |
1 files changed, 4 insertions, 2 deletions
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() |