It seems like the outdated speedGaugeElement was commented out of parseUserInterface.
I made this function to evaluate my ship speed before deploying sentry drones.
If it evaluates at 99999 it means something is wrong and you shouldn’t use it to make your decision.
shipCurrentSpeed : BotDecisionContext -> Int
shipCurrentSpeed context =
case context.readingFromGameClient.shipUI of
Nothing ->
99999
Just shipUISpeed ->
case
shipUISpeed.uiNode
|> EveOnline.ParseUserInterface.listDescendantsWithDisplayRegion
|> List.filter (.uiNode >> EveOnline.ParseUserInterface.getNameFromDictEntries >> Maybe.map (String.toLower >> String.contains "speedlabel") >> Maybe.withDefault False)
|> List.head
of
Nothing ->
99999
Just speedGauge ->
case
speedGauge.uiNode
|> getAllContainedDisplayTexts
|> List.head
of
Nothing ->
99999
Just speedGaugeText ->
let
speed =
Regex.find speedInRegex speedGaugeText
speedInRegex =
Maybe.withDefault Regex.never <|
Regex.fromString "^[^.]+"
speedFinalNumber =
String.join "" (speed |> List.map .match)
in
speedFinalNumber |> String.toInt |> Maybe.withDefault 99999