Add aggressive light culling
This commit is contained in:
@@ -78,7 +78,7 @@ airlockZ = defaultRoom
|
||||
[pContID (PS (V2 90 115) pi) (PutButton $ makeSwitch col red id id)
|
||||
$ \btid -> jspsJ (V2 0 60) 0 (PutDoor col (cond btid) outDoorps)
|
||||
$ sPS (V2 180 60) 0 (PutDoor col (cond btid) inDoorps)
|
||||
, sps0 $ PutWall (rectNSEW 70 50 120 60) defaultWall
|
||||
, sps0 $ PutWall (reverse $ rectNSWE 70 50 60 120) defaultWall
|
||||
, lighting
|
||||
]
|
||||
, _rmBound =
|
||||
|
||||
@@ -45,8 +45,8 @@ keyholeCorridor :: Room
|
||||
keyholeCorridor = corridor
|
||||
{ _rmPath = []
|
||||
, _rmPmnts =
|
||||
[ midWall $ rectNSEW top bot 0 15
|
||||
, midWall $ rectNSEW top bot 25 40]
|
||||
[ midWall $ reverse $ rectNSWE top bot 15 0
|
||||
, midWall $ reverse $ rectNSWE top bot 40 25]
|
||||
}
|
||||
where
|
||||
top = 65
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -100,7 +100,7 @@ addButtonSlowDoor x h rm = do
|
||||
["WARNING:"
|
||||
,"LARGE BIOMASS DETECTED"
|
||||
]
|
||||
openDoorBound = rectNSEW (h + 5) (h - 5) (-x/2) (3*x/2)
|
||||
openDoorBound = reverse $ rectNSWE (h + 5) (h - 5) (3*x/2) (-x/2)
|
||||
belowH y = (sndV2 . fst) y < h - 40
|
||||
aboveH y = (sndV2 . fst) y > h + 40
|
||||
amountedlight dr xoff = Just . moveLSThen (getdoorpos (fromJust $ _plMID dr))
|
||||
|
||||
@@ -249,10 +249,10 @@ centerVaultRoom w h d = return $ defaultRoom
|
||||
, inLink (V2 0 (-h)) pi ]
|
||||
, _rmPath = []
|
||||
, _rmPmnts =
|
||||
[sps0 $ PutWall (rectNSEW d (d - 30) d (d - 30)) defaultWall
|
||||
,sps0 $ PutWall (rectNSEW d (d - 30) (-d) (30 - d)) defaultWall
|
||||
,sps0 $ PutWall (rectNSEW (-d) (30 - d) d (d - 30)) defaultWall
|
||||
,sps0 $ PutWall (rectNSEW (-d) (30 - d) (-d) (30 - d)) defaultWall
|
||||
[sps0 $ PutWall (reverse $ rectNSWE d (d - 30) (d - 30) d ) defaultWall
|
||||
,sps0 $ PutWall (reverse $ rectNSWE d (d - 30) (30 - d) (-d)) defaultWall
|
||||
,sps0 $ PutWall (reverse $ rectNSWE (-d) (30 - d) (d - 30) d ) defaultWall
|
||||
,sps0 $ PutWall (reverse $ rectNSWE (-d) (30 - d) (30 - d) (-d)) defaultWall
|
||||
]
|
||||
++ map (\a -> mntLS vShape (rotateV a $ V2 0 d) (rotate3z a $ V3 0 (d+30) 70))
|
||||
[0,0.5*pi,pi,1.5*pi]
|
||||
|
||||
@@ -35,7 +35,7 @@ telRoomLev _ = do
|
||||
, _ppID = 0
|
||||
, _ppText = "NEW LEVEL"
|
||||
}
|
||||
ppFootprint = rectNSEW 20 (-20) 20 (-20)
|
||||
ppFootprint = reverse $ rectNSWE 20 (-20) (-20) 20
|
||||
levelReset pp w
|
||||
| dist (_crPos $ you w) (_ppPos pp) < 20 = makeExplosionAt (_ppPos pp) w
|
||||
| otherwise = w
|
||||
|
||||
Reference in New Issue
Block a user