From bae0275fc7b176c58c53b827e6b717aec351854f Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Tue, 17 Sep 2024 08:57:14 +0200 Subject: Fix: Corpse Tracker visiblility (#2516) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../skyhanni/features/mining/glacitemineshaft/CorpseTracker.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseTracker.kt index c54315d7e..f1d23185f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseTracker.kt @@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.features.mining.glacitemineshaft import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.IslandType +import at.hannibal2.skyhanni.data.MiningAPI import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.IslandChangeEvent import at.hannibal2.skyhanni.events.mining.CorpseLootedEvent @@ -82,8 +83,8 @@ object CorpseTracker { if (bucketData.getCorpseCount() == 0L) return@buildList var profit = tracker.drawItems(bucketData, { true }, this) - val applicableKeys: List = bucketData.getSelectedBucket()?.let { listOf(it) } - ?: enumValues().toList().filter { bucketData.corpsesLooted[it] != null } + val applicableKeys: List = bucketData.getSelectedBucket()?.let { listOf(it) } ?: enumValues().toList() + .filter { bucketData.corpsesLooted[it] != null } var totalKeyCost = 0.0 var totalKeyCount = 0 val keyCostStrings = buildList { @@ -138,5 +139,5 @@ object CorpseTracker { } fun isEnabled() = - config.enabled && IslandType.DWARVEN_MINES.isInIsland() && (!config.onlyInMineshaft || IslandType.MINESHAFT.isInIsland()) + LorenzUtils.inSkyBlock && config.enabled && (IslandType.MINESHAFT.isInIsland() || (!config.onlyInMineshaft && MiningAPI.inGlacialTunnels())) } -- cgit