Work on rect sensor rooms
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
module Dodge.Room.SensorDoor (sensAboveDoor, sensorRoomRunPast) where
|
module Dodge.Room.SensorDoor (sensAboveDoor, sensorRoomRunPast) where
|
||||||
|
|
||||||
|
import Dodge.RoomLink
|
||||||
import Dodge.Room.Procedural
|
import Dodge.Room.Procedural
|
||||||
import Control.Monad
|
import Control.Monad
|
||||||
import qualified Data.Set as S
|
import qualified Data.Set as S
|
||||||
@@ -28,7 +29,7 @@ import RandomHelp
|
|||||||
sensorRoom :: SensorType -> Int -> State LayoutVars (Tree Room)
|
sensorRoom :: SensorType -> Int -> State LayoutVars (Tree Room)
|
||||||
sensorRoom senseType n = do
|
sensorRoom senseType n = do
|
||||||
--rm <- join $ takeOne [addLightsNGon =<< roomNgon 8 200, roomRectAutoLights 200 200]
|
--rm <- join $ takeOne [addLightsNGon =<< roomNgon 8 200, roomRectAutoLights 200 200]
|
||||||
rm <- join $ takeOne [ roomRectAutoLights 200 200]
|
rm <- join $ takeOne [ roomRectAutoLights 200 200 <&> rmLinks %~ setOutLinks nonCornerLinks]
|
||||||
cenroom <- shuffleLinks $ sensInsideDoor senseType n rm
|
cenroom <- shuffleLinks $ sensInsideDoor senseType n rm
|
||||||
return $
|
return $
|
||||||
treePost
|
treePost
|
||||||
@@ -47,7 +48,11 @@ sensorRoom senseType n = do
|
|||||||
p' = p +.+ rotateV d (V2 0 (negate 100))
|
p' = p +.+ rotateV d (V2 0 (negate 100))
|
||||||
isclose = dist (_rlPos rl) p' < 30
|
isclose = dist (_rlPos rl) p' < 30
|
||||||
|
|
||||||
|
nonCornerLinks :: RoomLink -> Bool
|
||||||
|
nonCornerLinks = not . any f . (^. rlType)
|
||||||
|
where
|
||||||
|
f (FromEdge _ 0) = True
|
||||||
|
f _ = False
|
||||||
|
|
||||||
sensorRoomRunPast :: SensorType -> Int -> State LayoutVars MTRS
|
sensorRoomRunPast :: SensorType -> Int -> State LayoutVars MTRS
|
||||||
sensorRoomRunPast dt n = do
|
sensorRoomRunPast dt n = do
|
||||||
|
|||||||
Reference in New Issue
Block a user