Skip to content

Commit 193ca6b

Browse files
committed
Adapt to new inventory gauge form reported this week
Adapt to appearance of the inventory capacity gauge found in session-recording-2025-10-26T01-10-35.
1 parent c42f50d commit 193ca6b

9 files changed

Lines changed: 89 additions & 26 deletions

File tree

implement/applications/eve-online/eve-online-combat-anomaly-bot/Bot.elm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{- EVE Online combat anomaly bot version 2025-10-24
1+
{- EVE Online combat anomaly bot version 2025-10-29
22
33
This bot uses the probe scanner to find combat anomalies and kills rats using drones and weapon modules.
44

implement/applications/eve-online/eve-online-combat-anomaly-bot/EveOnline/ParseUserInterface.elm

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3253,14 +3253,17 @@ getSubstringBetweenXmlTagsAfterMarker marker =
32533253
parseNumberTruncatingAfterOptionalDecimalSeparator : String -> Result String Int
32543254
parseNumberTruncatingAfterOptionalDecimalSeparator numberDisplayText =
32553255
let
3256+
expectedSeparators : List String
32563257
expectedSeparators =
3257-
[ ",", ".", "", " ", "\u{00A0}", "\u{202F}" ]
3258+
[ ",", ".", "", "'", " ", "\u{00A0}", "\u{202F}" ]
32583259

3260+
groupsTexts : List String
32593261
groupsTexts =
32603262
expectedSeparators
32613263
|> List.foldl (\separator -> List.concatMap (String.split separator))
32623264
[ String.trim numberDisplayText ]
32633265

3266+
lastGroupIsFraction : Bool
32643267
lastGroupIsFraction =
32653268
case List.reverse groupsTexts of
32663269
lastGroupText :: _ :: _ ->
@@ -3269,6 +3272,7 @@ parseNumberTruncatingAfterOptionalDecimalSeparator numberDisplayText =
32693272
_ ->
32703273
False
32713274

3275+
integerText : String
32723276
integerText =
32733277
String.join ""
32743278
(if lastGroupIsFraction then

implement/applications/eve-online/eve-online-framework-test/tests/ParseMemoryReadingTest.elm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ inventory_capacity_gauge_text =
6767

6868
-- Add case with more than two groups in number
6969
, ( " 3.444.555,0 / 12.333.444,6 m³", Ok { used = 3444555, maximum = Just 12333444, selected = Nothing } )
70+
71+
-- 2025-10-29 scenario shared by Tim Bbil at https://forum.botlab.org/t/eve-mining-bot-is-stuck-on-i-do-not-see-the-mining-hold-capacity-gauge/5272
72+
, ( "0/5'000.0 m³", Ok { used = 0, maximum = Just 5000, selected = Nothing } )
7073
]
7174
|> List.map
7275
(\( text, expectedResult ) ->

implement/applications/eve-online/eve-online-mining-bot/Bot.elm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{- EVE Online mining bot version 2025-10-24
1+
{- EVE Online mining bot version 2025-10-29
22
33
This bot automates the complete mining process, including offloading the ore and traveling between the mining spot and the unloading location.
44

implement/applications/eve-online/eve-online-mining-bot/EveOnline/BotFramework.elm

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ To learn more about developing for EVE Online, see the guide at <https://to.botl
1919
import Array
2020
import Bitwise
2121
import BotLab.BotInterface_To_Host_2024_10_19 as InterfaceToHost
22+
import Common
2223
import Common.Basics
2324
import Common.EffectOnWindow
2425
import CompilationInterface.SourceFiles
@@ -1876,20 +1877,43 @@ useMenuEntryWithTextContaining textToSearch =
18761877
}
18771878

18781879

1879-
useMenuEntryWithTextContainingFirstOf : List String -> UseContextMenuCascadeNode -> UseContextMenuCascadeNode
1880+
useMenuEntryWithTextContainingFirstOfCommonContinuation : List String -> UseContextMenuCascadeNode -> UseContextMenuCascadeNode
1881+
useMenuEntryWithTextContainingFirstOfCommonContinuation priorities continuation =
1882+
useMenuEntryWithTextContainingFirstOf
1883+
(List.map (\textToSearch -> ( textToSearch, continuation )) priorities)
1884+
1885+
1886+
useMenuEntryWithTextContainingFirstOf :
1887+
List ( String, UseContextMenuCascadeNode )
1888+
-> UseContextMenuCascadeNode
18801889
useMenuEntryWithTextContainingFirstOf priorities =
1881-
useMenuEntryInLastContextMenuInCascade
1882-
{ describeChoice = "with text containing first available of " ++ (priorities |> List.map (String.Extra.surround "'") |> String.join ", ")
1890+
MenuEntryWithCustomChoice
1891+
{ describeChoice =
1892+
"with text containing first available of "
1893+
++ (priorities
1894+
|> List.map (\( textToSearch, _ ) -> String.Extra.surround "'" textToSearch)
1895+
|> String.join ", "
1896+
)
18831897
, chooseEntry =
1884-
\menuEntries ->
1898+
\menu ->
18851899
priorities
1886-
|> List.concatMap
1887-
(\textToSearch ->
1888-
menuEntries
1889-
|> List.filter (.text >> Common.Basics.stringContainsIgnoringCase textToSearch)
1890-
|> List.sortBy (.text >> String.trim >> String.length)
1900+
|> Common.listMapFind
1901+
(\( textToSearch, submenu ) ->
1902+
case
1903+
menu.entries
1904+
|> List.filter (.text >> Common.Basics.stringContainsIgnoringCase textToSearch)
1905+
|> List.sortBy (.text >> String.trim >> String.length)
1906+
|> List.head
1907+
of
1908+
Nothing ->
1909+
Nothing
1910+
1911+
Just menuEntry ->
1912+
Just
1913+
( menuEntry
1914+
, submenu
1915+
)
18911916
)
1892-
|> List.head
18931917
}
18941918

18951919

implement/applications/eve-online/eve-online-mining-bot/EveOnline/ParseUserInterface.elm

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3253,14 +3253,17 @@ getSubstringBetweenXmlTagsAfterMarker marker =
32533253
parseNumberTruncatingAfterOptionalDecimalSeparator : String -> Result String Int
32543254
parseNumberTruncatingAfterOptionalDecimalSeparator numberDisplayText =
32553255
let
3256+
expectedSeparators : List String
32563257
expectedSeparators =
3257-
[ ",", ".", "", " ", "\u{00A0}", "\u{202F}" ]
3258+
[ ",", ".", "", "'", " ", "\u{00A0}", "\u{202F}" ]
32583259

3260+
groupsTexts : List String
32593261
groupsTexts =
32603262
expectedSeparators
32613263
|> List.foldl (\separator -> List.concatMap (String.split separator))
32623264
[ String.trim numberDisplayText ]
32633265

3266+
lastGroupIsFraction : Bool
32643267
lastGroupIsFraction =
32653268
case List.reverse groupsTexts of
32663269
lastGroupText :: _ :: _ ->
@@ -3269,6 +3272,7 @@ parseNumberTruncatingAfterOptionalDecimalSeparator numberDisplayText =
32693272
_ ->
32703273
False
32713274

3275+
integerText : String
32723276
integerText =
32733277
String.join ""
32743278
(if lastGroupIsFraction then

implement/applications/eve-online/eve-online-warp-to-0-autopilot/Bot.elm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{- EVE Online warp-to-0 auto-pilot version 2025-10-24
1+
{- EVE Online warp-to-0 auto-pilot version 2025-10-29
22
33
This bot makes your travels faster and safer by directly warping to gates/stations. It follows the route set in the in-game autopilot and uses the context menu to initiate jump and dock commands.
44

implement/applications/eve-online/eve-online-warp-to-0-autopilot/EveOnline/BotFramework.elm

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ To learn more about developing for EVE Online, see the guide at <https://to.botl
1919
import Array
2020
import Bitwise
2121
import BotLab.BotInterface_To_Host_2024_10_19 as InterfaceToHost
22+
import Common
2223
import Common.Basics
2324
import Common.EffectOnWindow
2425
import CompilationInterface.SourceFiles
@@ -1876,20 +1877,43 @@ useMenuEntryWithTextContaining textToSearch =
18761877
}
18771878

18781879

1879-
useMenuEntryWithTextContainingFirstOf : List String -> UseContextMenuCascadeNode -> UseContextMenuCascadeNode
1880+
useMenuEntryWithTextContainingFirstOfCommonContinuation : List String -> UseContextMenuCascadeNode -> UseContextMenuCascadeNode
1881+
useMenuEntryWithTextContainingFirstOfCommonContinuation priorities continuation =
1882+
useMenuEntryWithTextContainingFirstOf
1883+
(List.map (\textToSearch -> ( textToSearch, continuation )) priorities)
1884+
1885+
1886+
useMenuEntryWithTextContainingFirstOf :
1887+
List ( String, UseContextMenuCascadeNode )
1888+
-> UseContextMenuCascadeNode
18801889
useMenuEntryWithTextContainingFirstOf priorities =
1881-
useMenuEntryInLastContextMenuInCascade
1882-
{ describeChoice = "with text containing first available of " ++ (priorities |> List.map (String.Extra.surround "'") |> String.join ", ")
1890+
MenuEntryWithCustomChoice
1891+
{ describeChoice =
1892+
"with text containing first available of "
1893+
++ (priorities
1894+
|> List.map (\( textToSearch, _ ) -> String.Extra.surround "'" textToSearch)
1895+
|> String.join ", "
1896+
)
18831897
, chooseEntry =
1884-
\menuEntries ->
1898+
\menu ->
18851899
priorities
1886-
|> List.concatMap
1887-
(\textToSearch ->
1888-
menuEntries
1889-
|> List.filter (.text >> Common.Basics.stringContainsIgnoringCase textToSearch)
1890-
|> List.sortBy (.text >> String.trim >> String.length)
1900+
|> Common.listMapFind
1901+
(\( textToSearch, submenu ) ->
1902+
case
1903+
menu.entries
1904+
|> List.filter (.text >> Common.Basics.stringContainsIgnoringCase textToSearch)
1905+
|> List.sortBy (.text >> String.trim >> String.length)
1906+
|> List.head
1907+
of
1908+
Nothing ->
1909+
Nothing
1910+
1911+
Just menuEntry ->
1912+
Just
1913+
( menuEntry
1914+
, submenu
1915+
)
18911916
)
1892-
|> List.head
18931917
}
18941918

18951919

implement/applications/eve-online/eve-online-warp-to-0-autopilot/EveOnline/ParseUserInterface.elm

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3253,14 +3253,17 @@ getSubstringBetweenXmlTagsAfterMarker marker =
32533253
parseNumberTruncatingAfterOptionalDecimalSeparator : String -> Result String Int
32543254
parseNumberTruncatingAfterOptionalDecimalSeparator numberDisplayText =
32553255
let
3256+
expectedSeparators : List String
32563257
expectedSeparators =
3257-
[ ",", ".", "", " ", "\u{00A0}", "\u{202F}" ]
3258+
[ ",", ".", "", "'", " ", "\u{00A0}", "\u{202F}" ]
32583259

3260+
groupsTexts : List String
32593261
groupsTexts =
32603262
expectedSeparators
32613263
|> List.foldl (\separator -> List.concatMap (String.split separator))
32623264
[ String.trim numberDisplayText ]
32633265

3266+
lastGroupIsFraction : Bool
32643267
lastGroupIsFraction =
32653268
case List.reverse groupsTexts of
32663269
lastGroupText :: _ :: _ ->
@@ -3269,6 +3272,7 @@ parseNumberTruncatingAfterOptionalDecimalSeparator numberDisplayText =
32693272
_ ->
32703273
False
32713274

3275+
integerText : String
32723276
integerText =
32733277
String.join ""
32743278
(if lastGroupIsFraction then

0 commit comments

Comments
 (0)