Attach terminal to analyser (these should rather be combined)

This commit is contained in:
2022-03-21 19:20:58 +00:00
parent 51cc04799d
commit 9c46027711
11 changed files with 92 additions and 47 deletions
+19 -5
View File
@@ -14,7 +14,7 @@ import Dodge.Room.Foreground
import Dodge.Placement.Instance
import Dodge.Placement.Instance.Analyser
import Dodge.Default.Room
--import Dodge.Item.Weapon.BulletGuns
import Dodge.Item.Consumable
--import Dodge.Item.Weapon.Utility
--import Dodge.LevelGen.Data
--import Geometry.Data
@@ -71,7 +71,19 @@ lightSensByDoor outplid rm = rm
sensorshift (p,a) = (p +.+ rotateV a (V2 60 (-20)), a)
healthAnalyserByDoor :: Int -> Room -> Room
healthAnalyserByDoor outplid rm = rm
healthAnalyserByDoor = analyserByDoor
[ replicate 20 '-'
, "HEALTH INTEGRITY CHECK"
, replicate 20 '-'
]
"PASSED"
"REQUIRES HEALTH AT LEAST 1100"
(replicate 3 "")
(testYourHealth 1100)
analyserByDoor :: [String] -> String -> String -> [String]
-> (Machine -> World -> World) -> Int -> Room -> Room
analyserByDoor sa sb sc sd mcf outplid rm = rm
& rmPmnts .++~
[ psPt atFstLnkOut $ PutShape $ colorSH yellow
$ barPP 1.5 (V3 20 (-1) 0) (V3 20 (-1) 80)
@@ -80,10 +92,10 @@ healthAnalyserByDoor outplid rm = rm
]
& rmOutPmnt .~
[OutPlacement
(analyser
(analyser sa sb sc sd
mcf
(atFstLnkOutShiftBy (\(p,a) -> (p +.+ rotateV a (V2 18.5 (-2.5)), a)))
(atFstLnkOutShiftBy sensorshift)
(testYourHealth 1100)
)
outplid]
where
@@ -94,7 +106,9 @@ healthTest :: RandomGen g => Int -> State g (SubCompTree Room)
healthTest n = do
cenroom <- shuffleLinks $ healthAnalyserByDoor n $ roomNgon 8 200
let doorroom = triggerDoorRoom n
return $ treeFromPost [PassDown door,PassDown cenroom,PassDown doorroom] (UseAll door)
return $ treeFromPost [PassDown door
,PassDown $ corridor & rmPmnts .:~ spNoID (PS 20 0) (PutFlIt (medkit 100))
,PassDown cenroom,PassDown doorroom] (UseAll door)
lasSensorTurretTest :: RandomGen g => Int -> State g (SubCompTree Room)
lasSensorTurretTest n = do