Remove after placements/genWorldPlacements

This commit is contained in:
2025-09-02 12:03:41 +01:00
parent 7b28ec15d1
commit dc13c61dca
3 changed files with 0 additions and 13 deletions
-1
View File
@@ -22,7 +22,6 @@ import System.Random
data GenWorld = GenWorld
{ _gwWorld :: World
, _genPlacements :: IM.IntMap [(Placement, Int)]
, _genRooms :: IM.IntMap Room
}
-11
View File
@@ -22,7 +22,6 @@ import Dodge.LevelGen.LevelStructure
import Dodge.LevelGen.StaticWalls
import Dodge.Path
import Dodge.Placement.PlaceSpot
import Dodge.Randify
import Dodge.Room.Link
import Dodge.ShiftPoint
import Dodge.Wall.Zone
@@ -37,7 +36,6 @@ generateLevelFromRoomList gr' w =
. over gwWorld randomCompass
. over gwWorld setupWorldBounds
-- . over (gwWorld . cWorld . lWorld) initItemLocations
. doAfterPlacements
. doInPlacements
. doOutPlacements
. doIndividualPlacements
@@ -80,15 +78,6 @@ shuffleRoomPos rm = do
newPos <- shuffle $ _rmPos rm
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, w) =
let (gw, rms) = mapAccumR (doRoomInPlacements im) w (_genRooms w)
-1
View File
@@ -16,7 +16,6 @@ worldToGenWorld rms w =
GenWorld
{ _gwWorld = w & cWorld . cwGen . cwgParams .~ evalState generateGenParams (_randGen w)
, _genRooms = rms
, _genPlacements = mempty
}
generateGenParams :: RandomGen g => State g GenParams