Remove outplacements
This commit is contained in:
+14
-14
@@ -37,7 +37,7 @@ generateLevelFromRoomList gr' w =
|
||||
. over gwWorld setupWorldBounds
|
||||
-- . over (gwWorld . cWorld . lWorld) initItemLocations
|
||||
. doInPlacements
|
||||
. doOutPlacements
|
||||
-- . doOutPlacements
|
||||
. doIndividualPlacements
|
||||
. setTiles
|
||||
. worldToGenWorld rs'
|
||||
@@ -88,20 +88,20 @@ doRoomInPlacements w rm = foldr f (w, rm) $ _rmInPmnt rm
|
||||
where
|
||||
f plf (w', r') = fst $ placeSpot (w', r') (plf (w'))
|
||||
|
||||
doOutPlacements :: GenWorld -> GenWorld
|
||||
doOutPlacements w =
|
||||
let ((pmnts, gw), rms) = mapAccumR doRoomOutPlacements (IM.empty, w) (_genRooms w)
|
||||
in gw & genRooms .~ rms & genPmnt <>~ pmnts
|
||||
--doOutPlacements :: GenWorld -> GenWorld
|
||||
--doOutPlacements w =
|
||||
-- let ((pmnts, gw), rms) = mapAccumR doRoomOutPlacements (IM.empty, w) (_genRooms w)
|
||||
-- in gw & genRooms .~ rms & genPmnt <>~ pmnts
|
||||
|
||||
doRoomOutPlacements ::
|
||||
(IM.IntMap [Placement], GenWorld) ->
|
||||
Room ->
|
||||
((IM.IntMap [Placement], GenWorld), Room)
|
||||
doRoomOutPlacements imw r = foldr f (imw, r) $ IM.toList $ _rmOutPmnt r
|
||||
where
|
||||
f (i, pl) ((im, w), rm) =
|
||||
let ((neww, newrm), plmnts) = placeSpot (w, rm) pl
|
||||
in ((IM.insert i plmnts im, neww), newrm)
|
||||
--doRoomOutPlacements ::
|
||||
-- (IM.IntMap [Placement], GenWorld) ->
|
||||
-- Room ->
|
||||
-- ((IM.IntMap [Placement], GenWorld), Room)
|
||||
--doRoomOutPlacements imw r = foldr f (imw, r) $ IM.toList $ _rmOutPmnt r
|
||||
-- where
|
||||
-- f (i, pl) ((im, w), rm) =
|
||||
-- let ((neww, newrm), plmnts) = placeSpot (w, rm) pl
|
||||
-- in ((IM.insert i plmnts im, neww), newrm)
|
||||
|
||||
doIndividualPlacements :: GenWorld -> GenWorld
|
||||
doIndividualPlacements gw =
|
||||
|
||||
Reference in New Issue
Block a user