Commit before tweaking placementn/room generation

This commit is contained in:
2025-09-23 09:52:52 +01:00
parent 4179115023
commit d1bb8a985b
18 changed files with 308 additions and 201 deletions
+18
View File
@@ -90,9 +90,27 @@ analyserByNthLink n proxreq i rm =
where
sensorshift (p, a) = (p +.+ rotateV a (V2 (-30) (-10)), a)
analyserByNthLinkWithPrompt
:: Int -> [TerminalLine] -> ProximityRequirement -> Int -> Room -> Room
analyserByNthLinkWithPrompt n l proxreq i rm =
rm
& rmPmnts
.++~ [ psPt (atNthLinkOut n) $ PutForeground $ verticalWire (V2 20 0) 0 80
]
& rmOutPmnt . at i ?~
analyserWithPrompt l
(SensorWithRequirement proxreq)
(atNthLnkOutShiftBy n (\(p, a) -> (p +.+ rotateV a (V2 18.5 (-2.5)), a)))
(atNthLnkOutShiftBy n sensorshift)
where
sensorshift (p, a) = (p +.+ rotateV a (V2 (-30) (-10)), a)
analyserByDoor :: ProximityRequirement -> Int -> Room -> Room
analyserByDoor = analyserByNthLink 0
analyserByDoorWithPrompt :: [TerminalLine] -> ProximityRequirement -> Int -> Room -> Room
analyserByDoorWithPrompt = analyserByNthLinkWithPrompt 0
healthTest :: RandomGen g => Int -> State g (Tree Room)
healthTest n = do
cenroom <- shuffleLinks =<< healthAnalyserByDoor n <$> roomNgon 8 200