Attach terminal to analyser (these should rather be combined)
This commit is contained in:
@@ -21,7 +21,7 @@ corridor = defaultRoom
|
||||
, _rmLinks = lnks'
|
||||
, _rmPath = concatMap (doublePair . (,) (V2 20 60) . fst) lnks
|
||||
, _rmPmnts = [ spanLightI (V2 0 39.5) (V2 40 39.5) ]
|
||||
, _rmBound = [ rectNSWE 50 30 0 40 ]
|
||||
, _rmBound = [ rectNSWE 50 30 (-5) 45 ]
|
||||
, _rmFloor = Tiled [makeTileFromPoly poly 2]
|
||||
, _rmRandPSs = [psRandRanges (10,30) (30,60) (0,2*pi)]
|
||||
, _rmName = "Corridor"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -48,9 +48,9 @@ roomPillars pillarsize w h wn hn = do
|
||||
-- : sps (PS (V2 220 (h-20)) 0) (PutLS $ lsColPos 0.75 (V3 0 0 90))
|
||||
-- : sps (PS (V2 120 20) 0) (PutLS $ lsColPos 0.75 (V3 0 0 90))
|
||||
replicate npillars (blockPillar (0.5*pilw) (0.5*pilh) & plSpot .~ rprBool
|
||||
(\rp _ -> and [RoomPosOffPath `S.member` _rpType rp
|
||||
, _rpPlacementUse rp == 0
|
||||
, _rpLinkStatus rp == NotLink ] )
|
||||
(\rp _ -> RoomPosOffPath `S.member` _rpType rp
|
||||
&& _rpPlacementUse rp == 0
|
||||
&& _rpLinkStatus rp == NotLink )
|
||||
)
|
||||
addGirderLights $ rm
|
||||
& rmPmnts .~ plmnts
|
||||
|
||||
@@ -254,11 +254,10 @@ weaponBetweenPillars = do
|
||||
, any ((<100) . dist (_rpPos rp)) (usedRoomInLinkPoss r)
|
||||
]
|
||||
ncrits <- state $ randomR (1,3)
|
||||
critPlacementSpots <- replicateM ncrits $ randDirPS $ rprBool $ \rp r -> and
|
||||
[ RoomPosOnPath `S.member` _rpType rp
|
||||
, _rpPlacementUse rp == 0
|
||||
, all ((>100) . dist (_rpPos rp)) (usedRoomLinkPoss r)
|
||||
]
|
||||
critPlacementSpots <- replicateM ncrits $ randDirPS $ rprBool $ \rp r ->
|
||||
RoomPosOnPath `S.member` _rpType rp
|
||||
&& _rpPlacementUse rp == 0
|
||||
&& all ((>100) . dist (_rpPos rp)) (usedRoomLinkPoss r)
|
||||
theRoom <- roomPillars 30 w h wn hn <&> rmPmnts .++~
|
||||
sps wpPos (RandPS randFirstWeapon) : map (`sps` randC1) critPlacementSpots
|
||||
return $ singleUseAll theRoom
|
||||
|
||||
Reference in New Issue
Block a user