Make Placement into a product type

This commit is contained in:
2025-09-02 12:31:55 +01:00
parent dc13c61dca
commit f278af0f30
29 changed files with 168 additions and 168 deletions
+9 -8
View File
@@ -21,15 +21,16 @@ import Geometry
import LensHelp
import RandomHelp
cenLasTur :: Room
cenLasTur =
roomNgon 8 200 & rmPmnts
cenLasTur :: RandomGen g => State g Room
cenLasTur = do
thelight <- mntLightLnkCond $ rprBool $ const . isInLnk
roomNgon 8 200 <&> rmPmnts
.~ [ putLasTurret 0.02
, heightWallPS
(resetPLUse $ rprBoolShift (const . isInLnk) (shiftInBy 100))
30
covershape
, mntLightLnkCond $ rprBool $ const . isInLnk
, thelight
]
where
covershape = rectNSWE 10 (-10) (-20) 20
@@ -59,7 +60,7 @@ lightSensByDoor i rm =
keyCardRoomRunPast :: RandomGen g => Int -> Int -> State g (MetaTree Room String)
keyCardRoomRunPast keyid rmid = do
cenroom <- shuffleLinks $ keyCardAnalyserByDoor keyid rmid $ roomNgon 6 200
cenroom <- shuffleLinks =<< keyCardAnalyserByDoor keyid rmid <$> roomNgon 6 200
let doorroom = triggerDoorRoom rmid
rToOnward "keyCardRoomRunPast" $
treeFromTrunk [door] $
@@ -94,7 +95,7 @@ analyserByDoor = analyserByNthLink 0
healthTest :: RandomGen g => Int -> State g (Tree Room)
healthTest n = do
cenroom <- shuffleLinks $ healthAnalyserByDoor n $ roomNgon 8 200
cenroom <- shuffleLinks =<< healthAnalyserByDoor n <$> roomNgon 8 200
return $
treePost
[ door
@@ -106,14 +107,14 @@ healthTest n = do
lasSensorTurretTest :: RandomGen g => Int -> State g (MetaTree Room String)
lasSensorTurretTest n = do
cenroom <- shuffleLinks $ lightSensInsideDoor n cenLasTur
cenroom <- shuffleLinks =<< lightSensInsideDoor n <$> cenLasTur
rToOnward "lasSensorTurretTest" $
treePost
[door, cenroom, triggerDoorRoom n, cleatOnward door]
lasCenSensEdge :: RandomGen g => Int -> State g (MetaTree Room String)
lasCenSensEdge n = do
cenroom <- shuffleLinks $ lightSensByDoor n cenLasTur
cenroom <- shuffleLinks =<< lightSensByDoor n <$> cenLasTur
let doorroom = triggerDoorRoom n
rToOnward "lasCenSensEdge" $
treeFromTrunk [door] $