Add aggressive light culling

This commit is contained in:
2022-06-17 18:24:24 +01:00
parent 55341f7caf
commit cbfb417d21
26 changed files with 114 additions and 47 deletions
+7 -7
View File
@@ -39,7 +39,7 @@ cenLasTur = roomNgon 8 200 & rmPmnts .~
, mntLightLnkCond $ rprBool $ const . isInLnk
]
where
covershape = rectNSEW 10 (-10) 20 (-20)
covershape = reverse $ rectNSWE 10 (-10) (-20) 20
lightSensInsideDoor :: Int -> Room -> Room
lightSensInsideDoor outplid rm = rm
@@ -68,7 +68,7 @@ lightSensByDoor outplid rm = rm
]
& rmOutPmnt .~ [OutPlacement (lasSensLightAboveDoor 20 (atFstLnkOutShiftBy sensorshift)) outplid]
where
covershape = rectNSEW 10 (-10) 20 (-20)
covershape = reverse $ rectNSWE 10 (-10) (-20) 20
sensorshift (p,a) = (p +.+ rotateV a (V2 60 (-20)), a)
keyCardRoomRunPast :: RandomGen g => Int -> Int -> State g (MetaTree Room String)
@@ -133,12 +133,12 @@ lasCenSensEdge n = do
lasTunnel :: RandomGen g => Float -> State g Room
lasTunnel y = do
extraPlmnts <- takeOne
[ [ midWall (rectNSEW 115 90 0 60)
, midWall (rectNSEW 65 40 (-40) 25)
[ [ midWall (reverse $ rectNSWE 115 90 0 60)
, midWall (reverse $ rectNSWE 65 40 (-40) 25)
]
, [ midWall (rectNSEW 125 100 0 25)
, midWall (rectNSEW 80 40 (-40) 0)
, midWall (rectNSEW 80 40 25 60)
, [ midWall (reverse $ rectNSWE 125 100 0 25)
, midWall (reverse $ rectNSWE 80 40 (-40) 0)
, midWall (reverse $ rectNSWE 80 40 25 60)
]
]
return defaultRoom