Work on autodoor pathing

This commit is contained in:
2025-10-24 13:19:21 +01:00
parent 7b622c8e31
commit 9eed2706b0
13 changed files with 68 additions and 87 deletions
+3 -5
View File
@@ -51,8 +51,7 @@ decontamRoom i =
return $
putDoubleDoor
switchWallObs
--(switchWallCol red)
defaultSwitchWall
defaultDoorWall
(cond pmnt)
(V2 (-10) 35)
(V2 (-10) 65)
@@ -62,7 +61,7 @@ decontamRoom i =
cutps = [rectNSWE 100 0 0 40, switchcut]
ps = (\p -> p - mcpos) <$> orderPolygon (concat cutps)
--thewall = switchWallCol col
thewall = defaultSwitchWall
thewall = defaultDoorWall
switchcut = rectNSWE 65 35 (-40) 80
lnks =
[ (V2 20 95, 0)
@@ -89,8 +88,7 @@ airlock0 =
, _rmBound = [rectNSWE 75 15 0 40, switchcut]
}
where
--thewall = switchWallCol col
thewall = defaultSwitchWall
thewall = defaultDoorWall
switchcut = rectNSWE 65 35 (-40) 20
lnks =
[ (V2 20 95, 0)
+1 -2
View File
@@ -42,6 +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
--switchWallObs (switchWallCol red) (cond pmnt) (V2 0 20) (V2 40 20) 2
switchWallObs defaultSwitchWall (cond pmnt) (V2 0 20) (V2 40 20) 2
switchWallObs defaultDoorWall (cond pmnt) (V2 0 20) (V2 40 20) 2
cond pmnt = WdTrig $ fromJust (_plMID pmnt)
+2 -2
View File
@@ -58,7 +58,7 @@ twinSlowDoorRoom w h x =
}
where
--thewall = switchWallCol red
thewall = defaultSwitchWall
thewall = defaultDoorWall
wlSpeed = 0.5
addColorChange lsid drid =
over prUpdate $
@@ -131,7 +131,7 @@ addButtonSlowDoor x h rm = do
-- TODO make the height of this light source and of other mounted lights
-- be taken from a single consistent source
--thewall = switchWallCol red
thewall = defaultSwitchWall
thewall = defaultDoorWall
butDoor = putLitButOnPos
col
(rprBool (isUnusedLnkType InLink))
+1 -1
View File
@@ -331,7 +331,7 @@ centerVaultRoom w h d =
sPS (V2 0 (d -10)) 0 (PutSlideDr (thedoor btid) thewall switchWallObs 1 (V2 21 0) (V2 0 0))
]
--thewall = switchWallCol col
thewall = defaultSwitchWall
thewall = defaultDoorWall
thedoor btid =
defaultDoor
& drTrigger .~ WdBlBtOn btid