Work on terminals, add deactive data type status

This commit is contained in:
2025-08-19 13:48:54 +01:00
parent 2f4fcb42e5
commit b8581a7862
13 changed files with 331 additions and 269 deletions
+3 -1
View File
@@ -66,6 +66,7 @@ accessTerminal mtmid w = fromMaybe w $ do
tm
& tmFutureLines .~ _tmBootLines tm
& tmStatus .~ TerminalLineRead
TerminalDeactivated -> error "managed to boot a deactivated terminal"
torqueCr :: Float -> Int -> World -> World
torqueCr x cid w
@@ -116,7 +117,8 @@ doTmWdWd tmwdwd = case tmwdwd of
-- tid <- tm ^? tmID
-- return $ cWorld . lWorld . terminals . ix tid . tmPartialCommand .~ x
TmWdId -> const id
TmWdWdDisconnectTerminal -> disconnectTerminal
TmWdWdPowerDownTerminal -> powerDownTerminal
TmWdWdDeactivateTerminal -> deactivateTerminal
TmWdWdTermSound sid -> \tm w ->
let tpos = fromMaybe 0 $ w ^? cWorld . lWorld . buttons . ix (_tmButtonID tm) . btPos
in soundStart TerminalSound tpos sid Nothing w