Cleanup unused datatypes
This commit is contained in:
@@ -19,10 +19,6 @@ import Dodge.Data.BlBl
|
||||
import Dodge.Data.Terminal.Status
|
||||
import Dodge.Data.WorldEffect
|
||||
|
||||
--data TerminalInput = TerminalInput
|
||||
-- { _tiSel :: (Int, Int)
|
||||
-- }
|
||||
|
||||
data Terminal = Terminal
|
||||
{ _tmID :: Int
|
||||
, _tmBootLines :: [TerminalLine]
|
||||
@@ -51,42 +47,12 @@ data TerminalToggle = TerminalToggle
|
||||
, _ttDeathEffect :: BlBl
|
||||
}
|
||||
|
||||
data EffectArguments
|
||||
= NoArguments {_cmdEffect :: [TerminalLine]}
|
||||
| OneArgument
|
||||
{ _argType :: String
|
||||
, _argList :: M.Map String [TerminalLine]
|
||||
}
|
||||
|
||||
data TerminalCommandEffect
|
||||
= TerminalCommandArguments EffectArguments
|
||||
| TerminalCommandEffectDamageCoding
|
||||
| TerminalCommandEffectSensorParameter
|
||||
| TerminalCommandEffectLinkedObject
|
||||
| TerminalCommandEffectHelp
|
||||
| TerminalCommandEffectNoArgumentsStr String
|
||||
| TerminalCommandEffectCommands
|
||||
| TerminalCommandEffectSingleCommand WdWd [String]
|
||||
| TerminalCommandEffectNone
|
||||
|
||||
--data TerminalCommand = TerminalCommand
|
||||
-- { _tcString :: String
|
||||
-- , _tcAlias :: [String]
|
||||
-- , _tcHelp :: String
|
||||
-- , _tcEffect :: TerminalCommandEffect -- Terminal -> World -> EffectArguments
|
||||
-- }
|
||||
|
||||
data TCom = TCInfo String String -- this may not be necessary, to revisit
|
||||
| TCBase
|
||||
| TCDamageCommand
|
||||
| TCSensorInfo
|
||||
| TCToggles
|
||||
|
||||
--data TEff = TEff
|
||||
-- { _teffHelp :: String
|
||||
-- , _teffArgs :: PTE.TrieMap Char [TerminalLine]
|
||||
-- }
|
||||
|
||||
data TmWdWd
|
||||
= TmWdId
|
||||
| TmWdWdPowerDownTerminal
|
||||
@@ -98,13 +64,10 @@ data TmWdWd
|
||||
| TmTmSetStatus TerminalStatus
|
||||
| TmGetDamageCoding SensorType
|
||||
| TmGetSensor String
|
||||
-- | TmDisplayCommands
|
||||
|
||||
makeLenses ''Terminal
|
||||
makeLenses ''TerminalLine
|
||||
makeLenses ''TerminalToggle
|
||||
makeLenses ''EffectArguments
|
||||
--makeLenses ''TerminalCommand
|
||||
makeLenses ''TCom
|
||||
concat
|
||||
<$> mapM
|
||||
@@ -112,9 +75,6 @@ concat
|
||||
[ ''TerminalLineString
|
||||
, ''TerminalLine
|
||||
, ''TerminalToggle
|
||||
, ''EffectArguments
|
||||
, ''TerminalCommandEffect
|
||||
-- , ''TerminalCommand
|
||||
, ''TCom
|
||||
, ''TmWdWd
|
||||
, ''Terminal
|
||||
|
||||
@@ -117,7 +117,10 @@ makeTermLine :: String -> TerminalLine
|
||||
makeTermLine = makeColorTermLine termTextColor
|
||||
|
||||
tlSetStatus :: TerminalStatus -> [TerminalLine]
|
||||
tlSetStatus x = [TLine 1 [] $ TmTmSetStatus x]
|
||||
tlSetStatus x = tlDoEffect $ TmTmSetStatus x
|
||||
|
||||
tlDoEffect :: TmWdWd -> [TerminalLine]
|
||||
tlDoEffect x = [TLine 1 [] x]
|
||||
|
||||
makeTermPara :: String -> [TerminalLine]
|
||||
makeTermPara = makeColorTermPara termTextColor
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
module Dodge.TerminalCommandEffect
|
||||
where
|
||||
|
||||
@@ -218,28 +218,3 @@ scrollRBOption dy ymax
|
||||
| dy < 0 = min (ymax -1) . subtract dy
|
||||
| dy > 0 = max 0 . subtract dy
|
||||
| otherwise = id
|
||||
|
||||
--scrollCommands :: Terminal -> [TerminalCommand]
|
||||
--scrollCommands = (nullCommand :) . _tmScrollCommands
|
||||
|
||||
--scrollCommandStrings :: World -> Terminal -> [String]
|
||||
--scrollCommandStrings w tm = case tm ^? tmPartialCommand . _Just of
|
||||
-- Nothing -> map _tcString $ scrollCommands tm
|
||||
-- Just tc -> "" : map tail (getArguments tc tm w)
|
||||
|
||||
--getArguments' :: TerminalCommand -> Terminal -> World -> [String]
|
||||
--getArguments' tc tm = ("" :) . getArguments tc tm
|
||||
|
||||
--nullCommand :: TerminalCommand
|
||||
--nullCommand =
|
||||
-- TerminalCommand
|
||||
-- { _tcString = ""
|
||||
-- , _tcAlias = []
|
||||
-- , _tcHelp = ""
|
||||
-- , _tcEffect = TerminalCommandEffectNone -- \_ _ -> NoArguments []
|
||||
-- }
|
||||
|
||||
--getArguments :: TerminalCommand -> Terminal -> World -> [String]
|
||||
--getArguments tc tm w = case doTerminalCommandEffect (_tcEffect tc) tm w of
|
||||
-- NoArguments{} -> []
|
||||
-- OneArgument _ m -> map (' ' :) $ M.keys m
|
||||
|
||||
Reference in New Issue
Block a user