Move GenWorld fields into World

This commit is contained in:
2022-06-02 18:48:20 +01:00
parent 66d098cfef
commit 35cd213bcf
35 changed files with 247 additions and 219 deletions
+2 -2
View File
@@ -5,7 +5,7 @@
module Dodge.Placement.PlaceSpot
( placeSpot
) where
import Dodge.LevelGen.LevelStructure
--import Dodge.LevelGen.LevelStructure
import Dodge.Placement.Shift
import Dodge.Data
import Dodge.Path
@@ -45,7 +45,7 @@ placeSpot (w,rm) plmnt = case plmnt of
shift = _rmShift rm
placePickOne :: Int -> Placement -> Room -> GenWorld -> GenWorld
placePickOne i pl rm w = w & gPlacements %~ IM.insertWith (++) i [(pl, fromJust (_rmMID rm))]
placePickOne i pl rm w = w & gWorld . genPlacements %~ IM.insertWith (++) i [(pl, fromJust (_rmMID rm))]
placeRandomPlacement :: State StdGen Placement -> GenWorld -> Room -> ((GenWorld,Room),[Placement])
placeRandomPlacement rplmnt w rm = placeSpot (w & gWorld . randGen .~ g,rm) plmnt'