diff options
author | Linnea Gräf <nea@nea.moe> | 2024-08-08 02:44:32 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-08-08 02:44:32 +0200 |
commit | 258faff2385e8370f1d37de890fe9c3d225e6331 (patch) | |
tree | b0fd3295e13b21965a530dc7c94426046af109a9 /src | |
parent | 71d0db252641a5cefa55c6af133d7a3631b06b88 (diff) | |
download | firmament-258faff2385e8370f1d37de890fe9c3d225e6331.tar.gz firmament-258faff2385e8370f1d37de890fe9c3d225e6331.tar.bz2 firmament-258faff2385e8370f1d37de890fe9c3d225e6331.zip |
Disable ancestral spade solver without an ancestral spade in your inventory
Diffstat (limited to 'src')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/features/diana/AncestralSpadeSolver.kt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/features/diana/AncestralSpadeSolver.kt b/src/main/kotlin/moe/nea/firmament/features/diana/AncestralSpadeSolver.kt index 039750d..39ca6d3 100644 --- a/src/main/kotlin/moe/nea/firmament/features/diana/AncestralSpadeSolver.kt +++ b/src/main/kotlin/moe/nea/firmament/features/diana/AncestralSpadeSolver.kt @@ -13,11 +13,14 @@ import moe.nea.firmament.events.WorldReadyEvent import moe.nea.firmament.events.WorldRenderLastEvent import moe.nea.firmament.events.subscription.SubscriptionOwner import moe.nea.firmament.features.FirmamentFeature +import moe.nea.firmament.util.MC import moe.nea.firmament.util.SBData import moe.nea.firmament.util.SkyBlockIsland +import moe.nea.firmament.util.SkyblockId import moe.nea.firmament.util.TimeMark import moe.nea.firmament.util.WarpUtil import moe.nea.firmament.util.render.RenderInWorldContext +import moe.nea.firmament.util.skyBlockId object AncestralSpadeSolver : SubscriptionOwner { var lastDing = TimeMark.farPast() @@ -27,10 +30,13 @@ object AncestralSpadeSolver : SubscriptionOwner { var nextGuess: Vec3d? = null private set + val ancestralSpadeId = SkyblockId("ANCESTRAL_SPADE") private var lastTeleportAttempt = TimeMark.farPast() fun isEnabled() = - DianaWaypoints.TConfig.ancestralSpadeSolver && SBData.skyblockLocation == SkyBlockIsland.HUB + DianaWaypoints.TConfig.ancestralSpadeSolver + && SBData.skyblockLocation == SkyBlockIsland.HUB + && MC.player?.inventory?.containsAny { it.skyBlockId == ancestralSpadeId } == true // TODO: add a reactive property here @Subscribe fun onKeyBind(event: WorldKeyboardEvent) { |