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
+3 -3
View File
@@ -40,7 +40,7 @@ basicTerminal =
, _tmTitle = "TERMINAL"
, _tmScrollCommands = [quitCommand]
, _tmWriteCommands = [helpCommand, commandsCommand]
, _tmBootProgram = TerminalBootLines connectionBlurb
, _tmBootLines = connectionBlurb
, _tmDeathEffect = TmWdWdDoDeathTriggers
}
@@ -127,7 +127,7 @@ makeColorTermPara :: Color -> String -> [TerminalLine]
makeColorTermPara col = map (makeColorTermLine col) . makeParagraph 55
makeColorTermLine :: Color -> String -> TerminalLine
makeColorTermLine col str = TerminalLineDisplay 0 $ TerminalLineConst str col
makeColorTermLine col str = TerminalLineDisplay 1 $ TerminalLineConst str col
commandColor :: Color
commandColor = yellow
@@ -251,7 +251,7 @@ togglesToEffects = fmap f . _tmToggles
f tt = [TerminalLineEffect 0 $ TmWdWdfromWdWd $ WdWdNegateTrig (_ttTriggerID tt)]
simpleTermMessage :: [String] -> Terminal
simpleTermMessage strs = defaultTerminal & tmFutureLines .~ map makeTermLine strs
simpleTermMessage strs = defaultTerminal & tmBootLines .~ map makeTermLine strs
commandFutureLines :: String -> Terminal -> World -> [TerminalLine]
commandFutureLines s tm w = fromMaybe [errline "^ Invalid command"] $ do