Make all items have an id an associated location
This commit is contained in:
@@ -4,6 +4,7 @@ module Dodge.Layout (
|
||||
) where
|
||||
|
||||
import qualified Control.Foldl as L
|
||||
import Dodge.Item.Location.Initialize
|
||||
import Control.Lens
|
||||
import Data.Foldable
|
||||
import Data.Function
|
||||
@@ -34,6 +35,7 @@ generateLevelFromRoomList gr' w =
|
||||
over gwWorld initWallZoning
|
||||
. over gwWorld randomCompass
|
||||
. over gwWorld setupWorldBounds
|
||||
. over (gwWorld . cWorld) initItemLocations
|
||||
. doAfterPlacements
|
||||
. doInPlacements
|
||||
. doOutPlacements
|
||||
@@ -52,6 +54,7 @@ generateLevelFromRoomList gr' w =
|
||||
rs = map doRoomShift $ IM.elems rs'
|
||||
rs' = mapM shuffleRoomPos gr' & evalState $ _randGen w
|
||||
|
||||
|
||||
randomCompass :: World -> World
|
||||
randomCompass w = w & cWorld . cameraRot .~ (takeOne [0, 0.5 * pi, pi, 1.5 * pi] & evalState $ _randGen w)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user