Remove after placements/genWorldPlacements
This commit is contained in:
@@ -22,7 +22,6 @@ import System.Random
|
|||||||
|
|
||||||
data GenWorld = GenWorld
|
data GenWorld = GenWorld
|
||||||
{ _gwWorld :: World
|
{ _gwWorld :: World
|
||||||
, _genPlacements :: IM.IntMap [(Placement, Int)]
|
|
||||||
, _genRooms :: IM.IntMap Room
|
, _genRooms :: IM.IntMap Room
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ import Dodge.LevelGen.LevelStructure
|
|||||||
import Dodge.LevelGen.StaticWalls
|
import Dodge.LevelGen.StaticWalls
|
||||||
import Dodge.Path
|
import Dodge.Path
|
||||||
import Dodge.Placement.PlaceSpot
|
import Dodge.Placement.PlaceSpot
|
||||||
import Dodge.Randify
|
|
||||||
import Dodge.Room.Link
|
import Dodge.Room.Link
|
||||||
import Dodge.ShiftPoint
|
import Dodge.ShiftPoint
|
||||||
import Dodge.Wall.Zone
|
import Dodge.Wall.Zone
|
||||||
@@ -37,7 +36,6 @@ generateLevelFromRoomList gr' w =
|
|||||||
. over gwWorld randomCompass
|
. over gwWorld randomCompass
|
||||||
. over gwWorld setupWorldBounds
|
. over gwWorld setupWorldBounds
|
||||||
-- . over (gwWorld . cWorld . lWorld) initItemLocations
|
-- . over (gwWorld . cWorld . lWorld) initItemLocations
|
||||||
. doAfterPlacements
|
|
||||||
. doInPlacements
|
. doInPlacements
|
||||||
. doOutPlacements
|
. doOutPlacements
|
||||||
. doIndividualPlacements
|
. doIndividualPlacements
|
||||||
@@ -80,15 +78,6 @@ shuffleRoomPos rm = do
|
|||||||
newPos <- shuffle $ _rmPos rm
|
newPos <- shuffle $ _rmPos rm
|
||||||
return $ rm & rmPos .~ newPos
|
return $ rm & rmPos .~ newPos
|
||||||
|
|
||||||
doAfterPlacements :: GenWorld -> GenWorld
|
|
||||||
doAfterPlacements gw = foldr doAfterPlacement gw (_genPlacements gw)
|
|
||||||
|
|
||||||
doAfterPlacement :: [(Placement, Int)] -> GenWorld -> GenWorld
|
|
||||||
doAfterPlacement pmntis gw = gRandify gw $ do
|
|
||||||
(pmnt, i) <- takeOne pmntis
|
|
||||||
let (newgw, rm) = fst $ placeSpot (gw, _genRooms gw IM.! i) pmnt
|
|
||||||
return $ newgw & genRooms . ix i .~ rm
|
|
||||||
|
|
||||||
doInPlacements :: (IM.IntMap [Placement], GenWorld) -> GenWorld
|
doInPlacements :: (IM.IntMap [Placement], GenWorld) -> GenWorld
|
||||||
doInPlacements (im, w) =
|
doInPlacements (im, w) =
|
||||||
let (gw, rms) = mapAccumR (doRoomInPlacements im) w (_genRooms w)
|
let (gw, rms) = mapAccumR (doRoomInPlacements im) w (_genRooms w)
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ worldToGenWorld rms w =
|
|||||||
GenWorld
|
GenWorld
|
||||||
{ _gwWorld = w & cWorld . cwGen . cwgParams .~ evalState generateGenParams (_randGen w)
|
{ _gwWorld = w & cWorld . cwGen . cwgParams .~ evalState generateGenParams (_randGen w)
|
||||||
, _genRooms = rms
|
, _genRooms = rms
|
||||||
, _genPlacements = mempty
|
|
||||||
}
|
}
|
||||||
|
|
||||||
generateGenParams :: RandomGen g => State g GenParams
|
generateGenParams :: RandomGen g => State g GenParams
|
||||||
|
|||||||
Reference in New Issue
Block a user