Improve pathing debugging, work on door pathing
This commit is contained in:
@@ -44,6 +44,14 @@ airlock0 = defaultRoom
|
||||
cond' btid w' = _btState (_buttons w' IM.! btid) == BtOn
|
||||
col = dim $ dim $ bright red
|
||||
|
||||
airlockDoor :: Color -> (World -> Bool) -> [(Point2,Point2)] -> PSType
|
||||
airlockDoor col = PutDoor col DoorObstacle
|
||||
|
||||
airlockDoubleDoor :: Point2 -> Point2 -> Color -> (World -> Bool) -> [(Point2,Point2)]
|
||||
-> [(Point2,Point2)] -> Maybe Placement
|
||||
airlockDoubleDoor p1 p2 col cond outDoorps inDoorps = jspsJ p1 0 (airlockDoor col cond outDoorps)
|
||||
$ sPS p2 0 (airlockDoor col cond inDoorps)
|
||||
|
||||
airlockSimple :: Room
|
||||
airlockSimple = defaultRoom
|
||||
{ _rmPolys =
|
||||
@@ -52,8 +60,9 @@ airlockSimple = defaultRoom
|
||||
, _rmPath = foldMap (doublePairSet . (V2 90 30,) . fst) lnks
|
||||
, _rmPmnts =
|
||||
[pContID (PS (V2 90 115) pi) (PutButton $ makeSwitch col red id id)
|
||||
$ \btid -> jspsJ (V2 0 0) 0 (PutDoor col (cond btid) outDoorps)
|
||||
$ sPS (V2 180 0) 0 (PutDoor col (cond btid) inDoorps)
|
||||
$ \btid -> airlockDoubleDoor 0 (V2 180 0) col (cond btid) outDoorps inDoorps
|
||||
-- jspsJ (V2 0 0) 0 (airlockDoor col (cond btid) outDoorps)
|
||||
-- $ sPS (V2 180 0) 0 (airlockDoor col (cond btid) inDoorps)
|
||||
]
|
||||
, _rmBound =
|
||||
[ rectNSWE 120 0 0 180 ]
|
||||
@@ -78,8 +87,9 @@ airlockZ = defaultRoom
|
||||
-- ]
|
||||
, _rmPmnts =
|
||||
[pContID (PS (V2 90 115) pi) (PutButton $ makeSwitch col red id id)
|
||||
$ \btid -> jspsJ (V2 0 60) 0 (PutDoor col (cond btid) outDoorps)
|
||||
$ sPS (V2 180 60) 0 (PutDoor col (cond btid) inDoorps)
|
||||
$ \btid -> airlockDoubleDoor (V2 0 60) (V2 180 60) col (cond btid) outDoorps inDoorps
|
||||
-- jspsJ (V2 0 60) 0 (airlockDoor col (cond btid) outDoorps)
|
||||
-- $ sPS (V2 180 60) 0 (airlockDoor col (cond btid) inDoorps)
|
||||
, sps0 $ PutWall (reverse $ rectNSWE 70 50 60 120) defaultWall
|
||||
, lighting
|
||||
]
|
||||
@@ -112,7 +122,7 @@ airlock90 = defaultRoom
|
||||
, _rmPath = doublePairSet (V2 0 40,V2 40 0)
|
||||
, _rmPmnts =
|
||||
[ pContID (PS (V2 120 120) (3 * pi/4)) (PutButton $ makeSwitch col red id id)
|
||||
$ \btid -> jsps (V2 5 5) 0 $ PutDoor col (cond btid) pss
|
||||
$ \btid -> jsps (V2 5 5) 0 $ airlockDoor col (cond btid) pss
|
||||
, mntLS vShape (V2 35 35) (V3 70 70 50)
|
||||
]
|
||||
, _rmBound =
|
||||
@@ -137,7 +147,7 @@ airlockCrystal = defaultRoom
|
||||
, _rmPath = mempty
|
||||
, _rmPmnts =
|
||||
[pContID (PS (V2 145 70) (pi/2)) ( PutButton $ makeSwitch col red id id)
|
||||
$ \btid -> jsps0 $ PutDoor col (cond btid) pss
|
||||
$ \btid -> jsps0 $ airlockDoor col (cond btid) pss
|
||||
, crystalLine (V2 0 70) (V2 40 70)
|
||||
, mntLS vShape (V2 150 70) (V3 110 70 70)
|
||||
]
|
||||
|
||||
@@ -46,8 +46,8 @@ twinSlowDoorRoom w h x = defaultRoom
|
||||
, _rmPath = mempty
|
||||
, _rmPmnts =
|
||||
[ pContID (PS (V2 0 (h-5)) pi) ( PutButton $ makeButton col id)
|
||||
$ \btid -> jsps0J (PutSlideDr (thedoor btid) thewall 1 (V2 x 1) (V2 x h))
|
||||
$ ps0 (PutSlideDr (thedoor btid) thewall 1 (V2 (-x) 1) (V2 (-x) h))
|
||||
$ \btid -> jsps0J (PutSlideDr (thedoor btid) thewall DoorObstacle 1 (V2 x 1) (V2 x h))
|
||||
$ ps0 (PutSlideDr (thedoor btid) thewall DoorObstacle 1 (V2 (-x) 1) (V2 (-x) h))
|
||||
$ \did -> jps0' (PutLS (lsColPos (V3 0.75 0 0) (V3 0 (h-1) lampHeight)))
|
||||
$ \lspl -> jsps0 $ PutProp $ addColorChange (fromJust $ _plMID lspl) did $ lampCoverWhen (drmoving did) (V2 0 (h-1)) lampHeight
|
||||
]
|
||||
|
||||
@@ -267,8 +267,8 @@ centerVaultRoom w h d = return $ defaultRoom
|
||||
col = dim $ dim $ bright red
|
||||
theDoor =
|
||||
[ pContID (PS (V2 35 (d+4)) 0) (PutButton $ makeSwitch col red id id)
|
||||
$ \btid -> jspsJ (V2 0 (d-10)) 0 (PutSlideDr (thedoor btid) thewall 1 (V2 (-21) 0) (V2 0 0))
|
||||
$ sPS (V2 0 (d-10)) 0 (PutSlideDr (thedoor btid) thewall 1 (V2 21 0) (V2 0 0))
|
||||
$ \btid -> jspsJ (V2 0 (d-10)) 0 (PutSlideDr (thedoor btid) thewall DoorObstacle 1 (V2 (-21) 0) (V2 0 0))
|
||||
$ sPS (V2 0 (d-10)) 0 (PutSlideDr (thedoor btid) thewall DoorObstacle 1 (V2 21 0) (V2 0 0))
|
||||
]
|
||||
thewall = switchWallCol col
|
||||
thedoor btid = defaultDoor
|
||||
|
||||
Reference in New Issue
Block a user