Separate out concrete part of world

This commit is contained in:
2022-07-25 12:10:50 +01:00
parent 3354d108be
commit b2efbd2b3e
134 changed files with 933 additions and 930 deletions
+3 -3
View File
@@ -29,17 +29,17 @@ generateWorldFromSeed i = do
return -- $ saveLevelStartSlot
$ postGenerationProcessing
$ _gwWorld (generateLevelFromRoomList roomList initialWorld{_randGen=mkStdGen i})
& roomClipping .~ bounds
& cWorld . roomClipping .~ bounds
postGenerationProcessing :: World -> World
postGenerationProcessing w = foldl' assignPushDoors w (_doors w)
postGenerationProcessing w = foldl' assignPushDoors w (_doors (_cWorld w))
generateGraphs :: IO ()
generateGraphs = TIO.writeFile "graph/itemCombinations.gv" combinationsDotGraph
assignPushDoors :: World -> Door -> World
assignPushDoors w dr = case dr ^?! drPushedBy of
PushedBy i -> w & doors . ix i . drPushes ?~ _drID dr
PushedBy i -> w & cWorld . doors . ix i . drPushes ?~ _drID dr
_ -> w
layoutLevelFromSeed :: Int -> Int -> IO (IM.IntMap Room,[ConvexPoly])