diff options
author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2024-03-29 15:59:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-29 15:59:14 +0100 |
commit | 20452d4d66d25b66bc820ed85f2596e0afe38a38 (patch) | |
tree | 6041dd4e0cad22bad7c8f5ebe780789c42109464 /src/main/java/at/hannibal2/skyhanni/features/rift | |
parent | 903d2605a90f541df96129bb30ea9bbe084385f7 (diff) | |
download | skyhanni-20452d4d66d25b66bc820ed85f2596e0afe38a38.tar.gz skyhanni-20452d4d66d25b66bc820ed85f2596e0afe38a38.tar.bz2 skyhanni-20452d4d66d25b66bc820ed85f2596e0afe38a38.zip |
Backend: Debug info for Rift Blood Effigies (#1313)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/rift')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt index be05e11fb..de0c57850 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt @@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.features.rift.area.stillgorechateau import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.jsonobjects.repo.RiftEffigiesJson +import at.hannibal2.skyhanni.events.DebugDataCollectEvent import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent @@ -28,7 +29,6 @@ class RiftBloodEffigies { private val config get() = RiftAPI.config.area.stillgoreChateau.bloodEffigies - private var locations: List<LorenzVec> = emptyList() private var effigiesTimes = mapOf( 0 to -1L, @@ -64,6 +64,23 @@ class RiftBloodEffigies { } @SubscribeEvent + fun onDebugDataCollect(event: DebugDataCollectEvent) { + event.title("Rift Blood Effigies") + + if (!isEnabled()) { + event.addIrrelevant("Not in Stillgore Château or not enabled ") + return + } + event.addData { + for ((number, duration) in effigiesTimes) { + val diff = duration - System.currentTimeMillis() + val time = TimeUtils.formatDuration(diff - 999) + add("$number: $time ($duration)") + } + } + } + + @SubscribeEvent fun onRepoReload(event: RepositoryReloadEvent) { val newLocations = event.getConstant<RiftEffigiesJson>("RiftEffigies").locations if (newLocations.size != 6) { |