Your replies are so in-dept. I like the explanations provided, really makes it easier to understand and incorporate in other projects.
It worked flawlessly.
Is it possible you haven’t had a session with subgroup of drones? They show up starting with entry_1 in the ui tree.
I have another question that will show how clueless I am.
We have this function that calls the modified launchDrones in mining bot.
travelToMiningSiteAndLaunchDronesAndTargetAsteroid : BotDecisionContext -> DecisionPathNode
travelToMiningSiteAndLaunchDronesAndTargetAsteroid context =
case context.readingFromGameClient |> topmostAsteroidFromOverviewWindow of
Nothing ->
describeBranch "I see no asteroid in the overview. Warp to mining site."
(returnDronesToBay context.readingFromGameClient
|> Maybe.withDefault
(warpToMiningSite context.readingFromGameClient)
)
Just asteroidInOverview ->
describeBranch ("Choosing asteroid '" ++ (asteroidInOverview.objectName |> Maybe.withDefault "Nothing") ++ "'")
(warpToOverviewEntryIfFarEnough context asteroidInOverview
|> Maybe.withDefault
(launchDrones context.readingFromGameClient
|> Maybe.withDefault
(lockTargetFromOverviewEntryAndEnsureIsInRange
context.readingFromGameClient
(min context.eventContext.appSettings.targetingRange
context.eventContext.appSettings.miningModuleRange
)
asteroidInOverview
)
)
)
If I wanted to re-order the logic so that launchDrones is called after lockTargetFromOverviewEntryAndEnsureIsInRange, how would I figure it out?