Cleanup
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
module Dodge.WorldEffect where
|
||||
module Dodge.WorldEffect
|
||||
( doWdWd
|
||||
, accessTerminal
|
||||
, doTmWdWd
|
||||
, lineOutputTerminal
|
||||
) where
|
||||
|
||||
import Data.Foldable
|
||||
import qualified Data.Map.Strict as M
|
||||
@@ -63,17 +68,6 @@ torqueCr x cid w
|
||||
where
|
||||
(rot, g) = randomR (- x, x) $ _randGen w
|
||||
|
||||
doCommandInstant :: String -> Terminal -> World -> World
|
||||
doCommandInstant arg tm w = doLineEffectsInstant tm w $ commandFutureLines arg tm w
|
||||
|
||||
-- doesn't do internal terminal effects
|
||||
doLineEffectsInstant :: Terminal -> World -> [TerminalLine] -> World
|
||||
doLineEffectsInstant tm = foldr f
|
||||
where
|
||||
f tl w = case tl of
|
||||
TerminalLineEffect _ eff -> doTmWdWd eff tm w
|
||||
_ -> w
|
||||
|
||||
lineOutputTerminal :: [TerminalLine] -> Terminal
|
||||
lineOutputTerminal tls =
|
||||
defaultTerminal
|
||||
@@ -81,7 +75,6 @@ lineOutputTerminal tls =
|
||||
, _tmFutureLines = []
|
||||
, _tmMaxLines = 14
|
||||
, _tmTitle = "TERMINAL"
|
||||
, _tmInput = defaultTerminalInput
|
||||
, _tmScrollCommands = [quitCommand]
|
||||
, _tmWriteCommands = [helpCommand, commandsCommand]
|
||||
, _tmBootProgram = TerminalBootLines $ connectionBlurbLines tls
|
||||
|
||||
Reference in New Issue
Block a user