Cleanup
This commit is contained in:
+23
-1
@@ -223,7 +223,7 @@ doLineEffectsInstant tm = foldr f
|
||||
basicTerminal :: Terminal
|
||||
basicTerminal = defaultTerminal
|
||||
{_tmDisplayedLines = []
|
||||
,_tmFutureLines = []
|
||||
,_tmFutureLines = []
|
||||
,_tmMaxLines = 14
|
||||
,_tmTitle = "TERMINAL"
|
||||
,_tmInput = defaultTerminalInput
|
||||
@@ -233,6 +233,19 @@ basicTerminal = defaultTerminal
|
||||
, _tmDeathEffect = doDeathTriggers
|
||||
}
|
||||
|
||||
lineOutputTerminal :: [TerminalLine] -> Terminal
|
||||
lineOutputTerminal tls = defaultTerminal
|
||||
{_tmDisplayedLines = []
|
||||
,_tmFutureLines = []
|
||||
,_tmMaxLines = 14
|
||||
,_tmTitle = "TERMINAL"
|
||||
,_tmInput = defaultTerminalInput
|
||||
,_tmScrollCommands = [quitCommand]
|
||||
,_tmWriteCommands = [helpCommand,commandsCommand]
|
||||
,_tmProgram = \_ _ -> connectionBlurbLines tls
|
||||
, _tmDeathEffect = doDeathTriggers
|
||||
}
|
||||
|
||||
doDeathTriggers :: Terminal -> World -> World
|
||||
doDeathTriggers tm w = w
|
||||
& triggers %~ flip (foldl' $ flip doDeathToggle) xs
|
||||
@@ -248,3 +261,12 @@ connectionBlurb =
|
||||
,TerminalLineDisplay 10 (const ("...",termTextColor))
|
||||
,TerminalLineDisplay 10 (const ("CONNECTED",termTextColor))
|
||||
,TerminalLineTerminalEffect 0 (tmStatus .~ TerminalReady)]
|
||||
|
||||
connectionBlurbLines :: [TerminalLine] -> [TerminalLine]
|
||||
connectionBlurbLines tls =
|
||||
[termSoundLine computerBeepingS
|
||||
,TerminalLineDisplay 0 (const ("CONNECTING",termTextColor))
|
||||
,TerminalLineDisplay 10 (const ("...",termTextColor))
|
||||
,TerminalLineDisplay 10 (const ("CONNECTED",termTextColor))
|
||||
] ++ tls ++
|
||||
[TerminalLineTerminalEffect 0 (tmStatus .~ TerminalReady)]
|
||||
|
||||
Reference in New Issue
Block a user