diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt index 6249ec54a..048100f71 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt @@ -7,6 +7,7 @@ import at.hannibal2.skyhanni.data.Perk import at.hannibal2.skyhanni.data.TitleManager import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.features.dungeon.DungeonAPI +import at.hannibal2.skyhanni.features.misc.visualwords.ModifyVisualWords import at.hannibal2.skyhanni.mixins.transformers.AccessorGuiEditSign import at.hannibal2.skyhanni.test.TestBingo import at.hannibal2.skyhanni.utils.ChatUtils.lastButtonClicked @@ -70,10 +71,20 @@ object LorenzUtils { val lastWorldSwitch get() = HypixelData.joinedWorld val isAprilFoolsDay: Boolean - get() = SkyHanniMod.feature.dev.debug.alwaysFunnyTime || LocalDate.now().let { - it.month == Month.APRIL && it.dayOfMonth == 1 + get() { + val itsTime = LocalDate.now().let { it.month == Month.APRIL && it.dayOfMonth == 1 } + val always = SkyHanniMod.feature.dev.debug.alwaysFunnyTime + val never = SkyHanniMod.feature.dev.debug.neverFunnyTime + val result = (!never && (always || itsTime)) + if (previousApril != result) { + ModifyVisualWords.textCache.clear() + } + previousApril = result + return result } + private var previousApril = false + fun SimpleDateFormat.formatCurrentTime(): String = this.format(System.currentTimeMillis()) fun stripVanillaMessage(originalMessage: String): String { |