Automatically determine automatic doors

This commit is contained in:
2025-10-24 21:08:41 +01:00
parent f94b914ceb
commit 6457f00ba7
8 changed files with 100 additions and 105 deletions
+4 -7
View File
@@ -95,9 +95,6 @@ airlock0 =
]
col = dim $ dim $ bright red
airlockDoor :: WdBl -> Float -> Point2A -> Point2A -> PSType
airlockDoor = PutDoor False
airlockDoubleDoor ::
Point2 ->
Point2 ->
@@ -110,8 +107,8 @@ airlockDoubleDoor ::
Point2A ->
Maybe Placement
airlockDoubleDoor p1 p2 cond l1 x1 y1 l2 x2 y2 =
jspsJ p1 0 (airlockDoor cond l1 x1 y1) $
sPS p2 0 (airlockDoor cond l2 x2 y2)
jspsJ p1 0 (PutDoor cond l1 x1 y1) $
sPS p2 0 (PutDoor cond l2 x2 y2)
airlockSimple :: Room
airlockSimple =
@@ -217,7 +214,7 @@ airlock90 =
[ pContID
(PS (V2 120 120) (3 * pi / 4))
(PutButton $ makeSwitch col red NoWorldEffect NoWorldEffect)
$ \btid -> jsps (V2 5 5) 0 $ airlockDoor (WdBlBtOn btid) l1 x1 y1
$ \btid -> jsps (V2 5 5) 0 $ PutDoor (WdBlBtOn btid) l1 x1 y1
, mntLS vShape (V2 35 35) (V3 70 70 50)
]
, _rmBound =
@@ -251,7 +248,7 @@ airlockCrystal =
[ pContID
(PS (V2 145 70) (pi / 2))
(PutButton $ makeSwitch col red NoWorldEffect NoWorldEffect)
$ \btid -> jsps (V2 40 70) 0 $ airlockDoor (WdBlBtOn btid) l1 x1 y1
$ \btid -> jsps (V2 40 70) 0 $ PutDoor (WdBlBtOn btid) l1 x1 y1
, crystalLine (V2 0 70) (V2 40 70)
, mntLS vShape (V2 150 70) (V3 110 70 70)
]