Commit before unifying placements in rooms (in/out)
This commit is contained in:
+13
-14
@@ -39,29 +39,28 @@ roomCritLS = do
|
||||
rad <- takeOne [300]
|
||||
return $ lsPosColRad (V3 0 0 h) col rad
|
||||
|
||||
critRoom :: Room
|
||||
critRoom = corridorWallN & rmRandPSs .~ [psRandRanges (15,25) (30,45) (pi,2*pi)]
|
||||
smallRoom :: Room
|
||||
smallRoom = corridorWallN & rmRandPSs .~ [psRandRanges (15,25) (30,45) (pi,2*pi)]
|
||||
|
||||
runPastRoom :: RandomGen g => Int -> State g (Tree Room)
|
||||
runPastRoom i = do
|
||||
h <- state $ randomR (200,400::Float)
|
||||
thels <- roomCritLS
|
||||
theweapon <- randBlockBreakWeapon
|
||||
--cenroom <- shuffleLinks $ restrictRMInLinksPD (\(V2 _ y,_) -> y < 1)
|
||||
cenroom <- shuffleLinks
|
||||
$ roomRectAutoLinks 40 h & rmPmnts .~ [plRRpt 0 (PutFlIt theweapon)]
|
||||
theedge <- takeOne $ map OnEdge [West,East]
|
||||
let linkcor = critRoom & rmPmnts .~ [ spanLS thels (V2 0 65) (V2 40 65) ]
|
||||
let linkcor = smallRoom & rmPmnts .~ [ spanLS thels (V2 0 65) (V2 40 65) ]
|
||||
critroom = linkcor & rmPmnts .:~ plRRpt 0 randC1
|
||||
aswitchroom = corridorWallN
|
||||
{_rmOutPmnt = [OutPlacement (putLitButOnPosExtTrig red useUnusedLnk) i]
|
||||
,_rmPmnts = []
|
||||
}
|
||||
switchdoor = triggerDoorRoom i
|
||||
n = length $ filter (elem theedge . _rlType) $ _rmLinks cenroom
|
||||
controom = treeFromPost [ switchdoor, linkcor,corridor,corridor] (useAll door)
|
||||
doorrooms = treeFromPost [ switchdoor] critroom
|
||||
: replicate (n-2) (treeFromPost [ switchdoor] linkcor)
|
||||
n = length $ filter (elem theedge . _rlType) (_rmLinks cenroom)
|
||||
doorrooms = map (treePost . (switchdoor:)) $ [critroom]
|
||||
: [ linkcor,corridor,corridor,useAll door]
|
||||
: replicate (n-2) [linkcor]
|
||||
return $ Node cenroom $
|
||||
map (over root $ rmConnectsTo .~ S.member theedge) (controom : doorrooms)
|
||||
++ [return aswitchroom]
|
||||
map (over root $ rmConnectsTo .~ S.member theedge) doorrooms
|
||||
++ [return corridorWallN
|
||||
{_rmOutPmnt = [OutPlacement (putLitButOnPosExtTrig red useUnusedLnk) i]
|
||||
,_rmPmnts = []
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user