Move towards implementing terminal autocomplete
This commit is contained in:
@@ -5,6 +5,7 @@ module Dodge.WorldEffect (
|
||||
lineOutputTerminal,
|
||||
) where
|
||||
|
||||
import qualified Data.ListTrie.Patricia.Map.Enum as PTE
|
||||
--import Dodge.DoubleTree
|
||||
import Dodge.Data.Terminal.Status
|
||||
import Dodge.Item.Grammar
|
||||
@@ -78,9 +79,6 @@ lineOutputTerminal tls =
|
||||
defaultTerminal
|
||||
{ _tmDisplayedLines = []
|
||||
, _tmFutureLines = []
|
||||
-- , _tmTitle = "TERMINAL"
|
||||
, _tmCommands = [helpCommand,commandsCommand,quitCommand]
|
||||
-- , _tmWriteCommands = [helpCommand, commandsCommand]
|
||||
, _tmBootLines = connectionBlurbLines tls
|
||||
, _tmDeathEffect = TmWdWdDoDeathTriggers
|
||||
}
|
||||
@@ -101,9 +99,14 @@ doTmWdWd tmwdwd = case tmwdwd of
|
||||
TmTmSetStatus x -> \tm -> fromMaybe id $ do
|
||||
tid <- tm ^? tmID
|
||||
return $ cWorld . lWorld . terminals . ix tid . tmStatus .~ x
|
||||
TmTmSetPartialCommand x -> \tm -> fromMaybe id $ do
|
||||
TmDisplayCommands -> \tm -> fromMaybe id $ do
|
||||
tid <- tm ^? tmID
|
||||
return $ cWorld . lWorld . terminals . ix tid . tmPartialCommand .~ x
|
||||
return $ cWorld . lWorld . terminals . ix tid . tmFutureLines .~
|
||||
makeColorTermPara commandColor
|
||||
(unwords (map fst (PTE.toList $ getCommands tm)))
|
||||
-- TmTmSetPartialCommand x -> \tm -> fromMaybe id $ do
|
||||
-- tid <- tm ^? tmID
|
||||
-- return $ cWorld . lWorld . terminals . ix tid . tmPartialCommand .~ x
|
||||
TmWdId -> const id
|
||||
TmWdWdDisconnectTerminal -> disconnectTerminal
|
||||
TmWdWdTermSound sid -> \tm w ->
|
||||
|
||||
Reference in New Issue
Block a user