summaryrefslogtreecommitdiff
path: root/haskell/src/SpaceTraders/Automation
diff options
context:
space:
mode:
authorJulien Dessaux2023-07-27 23:29:28 +0200
committerJulien Dessaux2023-07-27 23:29:28 +0200
commit20d4381c9c9f3f64feafc246d12dc546542e5e84 (patch)
treee149ffb4cbffebefd0c831b970342dea53339908 /haskell/src/SpaceTraders/Automation
parent[haskell] embed sql migration scripts from external files (diff)
downloadspacetraders-20d4381c9c9f3f64feafc246d12dc546542e5e84.tar.gz
spacetraders-20d4381c9c9f3f64feafc246d12dc546542e5e84.tar.bz2
spacetraders-20d4381c9c9f3f64feafc246d12dc546542e5e84.zip
[haskell] implemented ships's availability tracking in the database
Diffstat (limited to '')
-rw-r--r--haskell/src/SpaceTraders/Automation/Init.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/haskell/src/SpaceTraders/Automation/Init.hs b/haskell/src/SpaceTraders/Automation/Init.hs
index 5c70a1d..42c19e1 100644
--- a/haskell/src/SpaceTraders/Automation/Init.hs
+++ b/haskell/src/SpaceTraders/Automation/Init.hs
@@ -20,6 +20,7 @@ import SpaceTraders.APIClient.Ships
import SpaceTraders.Database
import SpaceTraders.Database.Agents
import SpaceTraders.Database.Contracts
+import SpaceTraders.Database.Ships
import SpaceTraders.Database.Tokens
deinitST :: Env -> IO ()
@@ -53,6 +54,7 @@ registerST = do
Right r' -> do
addAgent $ agent r'
addContract $ contract r'
+ addShip $ ship r'
_ <- myShips -- in order to fetch the starting probe that is not advertised in the register message
let t = token r'
addToken t