Broken: refactor terminals

This commit is contained in:
2022-07-25 00:45:15 +01:00
parent d1bf49319a
commit d219d8d889
25 changed files with 505 additions and 364 deletions
+2 -25
View File
@@ -11,7 +11,9 @@ module Dodge.Default
, module Dodge.Default.Weapon
, module Dodge.Default.Wall
, module Dodge.Default.Creature
, module Dodge.Default.Terminal
) where
import Dodge.Default.Terminal
import Dodge.Default.Wall
import Dodge.Default.Creature
import Dodge.Default.Weapon
@@ -58,31 +60,6 @@ defaultMachine = Machine
, _mcMounts = mempty
, _mcCloseSound = Nothing
}
defaultTerminal :: Terminal
defaultTerminal = Terminal
{ _tmID = 0
, _tmBootProgram = \_ _ -> []
, _tmButtonID = 0
, _tmMachineID = 0
, _tmName = "TESTTERMINAL"
, _tmDisplayedLines = []
, _tmFutureLines = []
, _tmMaxLines = 14
, _tmTitle = "TERMINAL IN LOCATION"
, _tmInput = defaultTerminalInput
, _tmScrollCommands = []
, _tmWriteCommands = []
, _tmDeathEffect = const id
, _tmStatus = TerminalOff
, _tmCommandHistory = []
, _tmToggles = M.empty
}
defaultTerminalInput :: TerminalInput
defaultTerminalInput = TerminalInput
{ _tiText = T.pack ""
, _tiFocus = True
, _tiSel = (0,0)
}
defaultButton :: Button
defaultButton = Button