Simplify terminal boot program

This commit is contained in:
2025-08-14 19:46:07 +01:00
parent 198b7acc78
commit 5b720cb82c
6 changed files with 17 additions and 13 deletions
+6 -6
View File
@@ -61,7 +61,7 @@ accessTerminal mtmid w = fromMaybe w $ do
TerminalBusy -> tm
TerminalOff ->
tm
& tmFutureLines .~ doTerminalBootProgram (_tmBootProgram tm) tm w
& tmFutureLines .~ _tmBootLines tm
& tmStatus .~ TerminalBusy
torqueCr :: Float -> Int -> World -> World
@@ -79,7 +79,7 @@ lineOutputTerminal tls =
, _tmTitle = "TERMINAL"
, _tmScrollCommands = [quitCommand]
, _tmWriteCommands = [helpCommand, commandsCommand]
, _tmBootProgram = TerminalBootLines $ connectionBlurbLines tls
, _tmBootLines = connectionBlurbLines tls
, _tmDeathEffect = TmWdWdDoDeathTriggers
}
@@ -91,10 +91,10 @@ doDeathTriggers tm = cWorld . lWorld . triggers %~ flip (foldl' $ flip doDeathTo
doDeathToggle :: TerminalToggle -> IM.IntMap Bool -> IM.IntMap Bool
doDeathToggle (TerminalToggle trid f) = ix trid %~ doBlBl f
doTerminalBootProgram :: TerminalBootProgram -> Terminal -> World -> [TerminalLine]
doTerminalBootProgram tbp = case tbp of
TerminalBootMempty -> \_ _ -> []
TerminalBootLines ls -> \_ _ -> ls
--doTerminalBootProgram :: TerminalBootProgram -> Terminal -> World -> [TerminalLine]
--doTerminalBootProgram tbp = case tbp of
-- TerminalBootMempty -> \_ _ -> []
-- TerminalBootLines ls -> \_ _ -> ls
doTmWdWd :: TmWdWd -> Terminal -> World -> World
doTmWdWd tmwdwd = case tmwdwd of