I see current docking way is too slow because of many menu used. So this is new way to dock using hot key and overview:
dockToStationFromOverviewEntry : BotDecisionContext -> DecisionPathNode
dockToStationFromOverviewEntry context =
let
nameToDocks = ["Fortizar","Keepstar","Astrahus"]
matchesNameToDock stringToTest =
nameToDocks
|> List.any
(\nameToDock ->
stringToTest
|> String.toLower
|> String.contains (String.toLower nameToDock)
)
overviewEntryMatchesNameToDock overviewEntry =
[ overviewEntry.objectName, overviewEntry.objectType ]
|> List.filterMap identity
|> List.any matchesNameToDock
stationToDock =
context.readingFromGameClient.overviewWindow
|> EveOnline.ParseUserInterface.maybeNothingFromCanNotSeeIt
|> Maybe.map .entries
|> Maybe.withDefault []
|> List.filter overviewEntryMatchesNameToDock
in
case stationToDock |> List.head of
Nothing ->
describeBranch ("There are no station to dock from overview entry") askForHelpToGetUnstuck
Just stationInOverview ->
describeBranch ("Dock to station from overview entry")
(endDecisionPath
(actWithoutFurtherReadings
( "Click on the overview entry and press the D key."
, [ VolatileHostInterface.KeyDown EffectOnWindow.VK_D
, stationInOverview.uiNode |> clickOnUIElement MouseButtonLeft
, VolatileHostInterface.KeyUp EffectOnWindow.VK_D
]
)
)
)```