Cleanup
This commit is contained in:
@@ -52,8 +52,11 @@ addWarningTerminal str outplid = (rmName .++~ "warningTerm-")
|
|||||||
where
|
where
|
||||||
outplace = extTrigLitPos
|
outplace = extTrigLitPos
|
||||||
(atFstLnkOutShiftBy (\(p,a) -> (p +.+ rotateV a (V2 18.5 (-2.5)), a)))
|
(atFstLnkOutShiftBy (\(p,a) -> (p +.+ rotateV a (V2 18.5 (-2.5)), a)))
|
||||||
(Just . set plSpot (rprShift moveToSideFirstOutLink) . putMessageTerminal terminalColor . termMessages)
|
(Just . set plSpot (rprShift moveToSideFirstOutLink)
|
||||||
termMessages trpl = basicTerminal & tmScrollCommands .:~ toggleCommand
|
. putMessageTerminal terminalColor . termMessages)
|
||||||
|
termMessages trpl = basicTerminal
|
||||||
|
& tmFutureLines .~ makeTermPara str
|
||||||
|
& tmScrollCommands .:~ toggleCommand
|
||||||
& tmToggles .~ M.fromList
|
& tmToggles .~ M.fromList
|
||||||
[("DOOR",TerminalToggle (fromJust $ _plMID trpl) (const (const True)))]
|
[("DOOR",TerminalToggle (fromJust $ _plMID trpl) (const (const True)))]
|
||||||
|
|
||||||
|
|||||||
+23
-1
@@ -223,7 +223,7 @@ doLineEffectsInstant tm = foldr f
|
|||||||
basicTerminal :: Terminal
|
basicTerminal :: Terminal
|
||||||
basicTerminal = defaultTerminal
|
basicTerminal = defaultTerminal
|
||||||
{_tmDisplayedLines = []
|
{_tmDisplayedLines = []
|
||||||
,_tmFutureLines = []
|
,_tmFutureLines = []
|
||||||
,_tmMaxLines = 14
|
,_tmMaxLines = 14
|
||||||
,_tmTitle = "TERMINAL"
|
,_tmTitle = "TERMINAL"
|
||||||
,_tmInput = defaultTerminalInput
|
,_tmInput = defaultTerminalInput
|
||||||
@@ -233,6 +233,19 @@ basicTerminal = defaultTerminal
|
|||||||
, _tmDeathEffect = doDeathTriggers
|
, _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 :: Terminal -> World -> World
|
||||||
doDeathTriggers tm w = w
|
doDeathTriggers tm w = w
|
||||||
& triggers %~ flip (foldl' $ flip doDeathToggle) xs
|
& triggers %~ flip (foldl' $ flip doDeathToggle) xs
|
||||||
@@ -248,3 +261,12 @@ connectionBlurb =
|
|||||||
,TerminalLineDisplay 10 (const ("...",termTextColor))
|
,TerminalLineDisplay 10 (const ("...",termTextColor))
|
||||||
,TerminalLineDisplay 10 (const ("CONNECTED",termTextColor))
|
,TerminalLineDisplay 10 (const ("CONNECTED",termTextColor))
|
||||||
,TerminalLineTerminalEffect 0 (tmStatus .~ TerminalReady)]
|
,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