From eb7fd3da94cec90674e29e93ca0d744e2a2889fb Mon Sep 17 00:00:00 2001 From: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Date: Thu, 6 Jun 2024 00:01:30 +1000 Subject: Backend: More second passed (#1899) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../hannibal2/skyhanni/features/skillprogress/SkillProgress.kt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/skillprogress') diff --git a/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillProgress.kt b/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillProgress.kt index fe6d3e4a1..245e21100 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillProgress.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillProgress.kt @@ -11,8 +11,8 @@ import at.hannibal2.skyhanni.config.features.skillprogress.SkillProgressConfig import at.hannibal2.skyhanni.events.ActionBarUpdateEvent import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.ProfileJoinEvent +import at.hannibal2.skyhanni.events.SecondPassedEvent import at.hannibal2.skyhanni.events.SkillOverflowLevelupEvent import at.hannibal2.skyhanni.features.skillprogress.SkillUtil.XP_NEEDED_FOR_60 import at.hannibal2.skyhanni.utils.ChatUtils.chat @@ -140,14 +140,12 @@ object SkillProgress { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onSecondPassed(event: SecondPassedEvent) { if (!isEnabled()) return if (lastUpdate.passedSince() > 3.seconds) showDisplay = config.alwaysShow.get() - if (event.repeatSeconds(1)) { - allDisplay = formatAllDisplay(drawAllDisplay()) - etaDisplay = drawETADisplay() - } + allDisplay = formatAllDisplay(drawAllDisplay()) + etaDisplay = drawETADisplay() if (event.repeatSeconds(2)) { update() -- cgit