Cleanup door placement/auto path generation

This commit is contained in:
2025-10-24 20:51:38 +01:00
parent b0d519c69d
commit f94b914ceb
9 changed files with 83 additions and 155 deletions
+4 -5
View File
@@ -35,8 +35,8 @@ decontamRoom i =
& rmPmnts
.~ [ pContID (PS (V2 (-35) 50) (negate $ pi / 2)) (PutButton $ makeSwitch col red NoWorldEffect NoWorldEffect) $
\btid -> Just $
putDoubleDoorThen False switchWallObs thewall (WdBlNegate $ WdBlBtOn btid) 1 (V2 0 20) (V2 40 20) 2 $
\_ _ -> Just $ putDoubleDoor False switchWallObs thewall (WdBlBtOn btid) (V2 0 80) (V2 40 80) 2
putDoubleDoorThen False thewall (WdBlNegate $ WdBlBtOn btid) 1 (V2 0 20) (V2 40 20) 2 $
\_ _ -> Just $ putDoubleDoor False thewall (WdBlBtOn btid) (V2 0 80) (V2 40 80) 2
, invisibleWall $ rectNSWE 60 40 (-40) (-30)
, spanLightI (V2 (-20) 30) (V2 (-20) 70)
, analyser (NoItemZone ps) (PS 50 0) (PS mcpos 0) & plExternalID ?~ i
@@ -50,7 +50,6 @@ decontamRoom i =
pmnt <- gw ^? genPmnt . ix i
return $
putDoubleDoor False
switchWallObs
defaultDoorWall
(cond pmnt)
(V2 (-10) 35)
@@ -79,8 +78,8 @@ airlock0 =
, _rmPmnts =
[ pContID (PS (V2 (-35) 50) (negate $ pi / 2)) (PutButton $ makeSwitch col red NoWorldEffect NoWorldEffect) $
\btid -> Just $
putDoubleDoorThen False switchWallObs thewall (WdBlNegate $ WdBlBtOn btid) 1 (V2 0 20) (V2 40 20) 2 $
\_ _ -> Just $ putDoubleDoor False switchWallObs thewall (WdBlBtOn btid) (V2 0 80) (V2 40 80) 2
putDoubleDoorThen False thewall (WdBlNegate $ WdBlBtOn btid) 1 (V2 0 20) (V2 40 20) 2 $
\_ _ -> Just $ putDoubleDoor False thewall (WdBlBtOn btid) (V2 0 80) (V2 40 80) 2
, invisibleWall $ rectNSWE 60 40 (-40) (-30)
, spanLightI (V2 (-2) 30) (V2 (-2) 70)
, sps0 $ putShape $ thinHighBar 75 (V2 40 50) (V2 (-1) 50)
+1 -1
View File
@@ -42,5 +42,5 @@ triggerDoorRoom i =
f gw = fromMaybe (error "tried to put a door using an empty placement list") $ do
pmnt <- gw ^? genPmnt . ix i
return $ putDoubleDoor False
switchWallObs defaultDoorWall (cond pmnt) (V2 0 20) (V2 40 20) 2
defaultDoorWall (cond pmnt) (V2 0 20) (V2 40 20) 2
cond pmnt = WdTrig $ fromJust (_plMID pmnt)
+2 -3
View File
@@ -48,8 +48,8 @@ twinSlowDoorRoom w h x =
, _rmPath = mempty
, _rmPmnts =
[ pContID (PS (V2 0 (h -5)) pi) (PutButton $ makeButton col NoWorldEffect) $
\btid -> jsps0J (PutSlideDr False (thedoor btid) thewall switchWallObs 1 (V2 x 1) (V2 x h)) $
ps0 (PutSlideDr False (thedoor btid) thewall switchWallObs 1 (V2 (- x) 1) (V2 (- x) h)) $
\btid -> jsps0J (PutSlideDr False (thedoor btid) thewall 1 (V2 x 1) (V2 x h)) $
ps0 (PutSlideDr False (thedoor btid) thewall 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 (WdBlDoorMoving did) (V2 0 (h -1)) lampheight
]
@@ -138,7 +138,6 @@ addButtonSlowDoor x h rm = do
(rprBool (isUnusedLnkType InLink))
$ \btplmnt -> Just $
putDoubleDoorThen False
switchWallObs
thewall
(WdBlBtOn $ fromJust $ _plMID btplmnt)
30
+2 -2
View File
@@ -328,8 +328,8 @@ centerVaultRoom w h d =
theDoor =
[ pContID (PS (V2 35 (d + 4)) 0) (PutButton $ makeSwitch col red NoWorldEffect NoWorldEffect) $
\btid ->
jspsJ (V2 0 (d -10)) 0 (PutSlideDr False (thedoor btid) thewall switchWallObs 1 (V2 (-21) 0) (V2 0 0)) $
sPS (V2 0 (d -10)) 0 (PutSlideDr False (thedoor btid) thewall switchWallObs 1 (V2 21 0) (V2 0 0))
jspsJ (V2 0 (d -10)) 0 (PutSlideDr False (thedoor btid) thewall 1 (V2 (-21) 0) (V2 0 0)) $
sPS (V2 0 (d -10)) 0 (PutSlideDr False (thedoor btid) thewall 1 (V2 21 0) (V2 0 0))
]
--thewall = switchWallCol col
thewall = defaultDoorWall