Cleanup terminal display

This commit is contained in:
2022-06-03 09:20:03 +01:00
parent 28a002eb08
commit 5ff2fb4910
24 changed files with 198 additions and 180 deletions
+4 -15
View File
@@ -3,6 +3,7 @@ module Dodge.Room.SensorDoor where
import Dodge.LevelGen.Data
import Dodge.PlacementSpot
import Dodge.Placement.Instance.Terminal
import Dodge.Terminal
import Dodge.Data
import Dodge.Tree
--import Dodge.RoomLink
@@ -30,7 +31,6 @@ import Dodge.RandomHelp
import qualified Data.Set as S
import Data.Maybe
import Data.Char
--import Data.Tree
import Control.Monad.State
import System.Random
@@ -83,20 +83,9 @@ sensInsideDoor senseType outplid rm = rm
thinHighBar 0 (V2 20 (-1)) (V2 20 (-100))
<> thinHighBar 0 (V2 0 (-100)) (V2 20 (-100))
<> barPP 1.5 (V3 20 (-1) 0) (V3 20 (-1) 80))
, putTerminal (genTermMessage messagef)
, putTerminal (const $ defaultTermParams & addInputLine [damageCodeCommand,quitCommand]
[helpCommand,commandsCommand]
)
& plSpot .~ rprBoolShift isUnusedLnk (shiftInBy 10)
]
& rmOutPmnt .~ [OutPlacement (sensAboveDoor senseType 10 (atFstLnkOutShiftInward 100)) outplid]
where
mtoup = map toUpper
horline = "-----------------"
messagef gp =
let Just (pc,ds) = gp ^? sensorCoding . ix senseType
in [horline
,"SENSOR ATTRIBUTES"
,horline
,mtoup $ show senseType
,"COLOR:"++ mtoup (show pc)
,"SHAPE:"++ mtoup (reverse . drop 10 . reverse $ show ds)
,horline
]