From 258faff2385e8370f1d37de890fe9c3d225e6331 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Thu, 8 Aug 2024 02:44:32 +0200 Subject: Disable ancestral spade solver without an ancestral spade in your inventory --- .../moe/nea/firmament/features/diana/AncestralSpadeSolver.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/main/kotlin/moe') 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) { -- cgit