Successfully stop reuse of link placement spots
This commit is contained in:
+1
-4
@@ -41,8 +41,6 @@ generateLevelFromRoomList :: State StdGen [Room] -> World -> World
|
||||
generateLevelFromRoomList gr w
|
||||
= initWallZoning
|
||||
. setupWorldBounds
|
||||
-- . flip (foldr $ flip placeSpot) plmnts
|
||||
-- . flip (foldl' placeSpot) plmnts
|
||||
. flip (foldl' doRoomPlacements) rs
|
||||
$ w { _walls = wallsFromRooms rs
|
||||
, _floorTiles = floorsFromRooms rs
|
||||
@@ -53,12 +51,11 @@ generateLevelFromRoomList gr w
|
||||
where
|
||||
path = pairsToGraph dist pairPath
|
||||
pairPath = concatMap _rmPath rs
|
||||
plmnts = concatMap (\rm -> map (rm,) (_rmPS rm)) rs
|
||||
rs = zipWith addTile zs . evalState gr $ _randGen w
|
||||
zs = map fromIntegral $ randomRs (0,63::Int) $ _randGen w
|
||||
|
||||
doRoomPlacements :: World -> Room -> World
|
||||
doRoomPlacements w rm = fst $ foldl' placeSpot' (w,rm) $ _rmPS rm
|
||||
doRoomPlacements w rm = fst $ foldl' placeSpot (w,rm) $ _rmPS rm
|
||||
|
||||
updatePSLnkUsing :: (Point2,Float) -> PlacementSpot -> PlacementSpot
|
||||
updatePSLnkUsing pf PSLnk{_psLinkShift=f} = uncurry PS $ f pf
|
||||
|
||||
Reference in New Issue
Block a user