aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/events
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/events')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/events/LorenzTickEvent.kt5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/events/LorenzTickEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/LorenzTickEvent.kt
index 069cae5f8..12b837da5 100644
--- a/src/main/java/at/hannibal2/skyhanni/events/LorenzTickEvent.kt
+++ b/src/main/java/at/hannibal2/skyhanni/events/LorenzTickEvent.kt
@@ -2,8 +2,7 @@ package at.hannibal2.skyhanni.events
class LorenzTickEvent(private val tick: Int) : LorenzEvent() {
- fun isMod(i: Int) = tick % i == 0
+ fun isMod(i: Int, offset: Int = 0) = (tick + offset) % i == 0
- @Deprecated("Use SecondPassedEvent instead", ReplaceWith(""))
- fun repeatSeconds(i: Int) = isMod(i * 20)
+ fun repeatSeconds(i: Int, offset: Int = 0) = isMod(i * 20, offset)
}