Move universe IO effects outside of world

This commit is contained in:
2022-07-23 12:53:20 +01:00
parent 2892bb25f0
commit 12fad676f2
12 changed files with 41 additions and 44 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ startNewGame u = startSeedGame i u
startSeedGame :: Int -> Universe -> Universe
startSeedGame i u = u
& menuLayers .~ [WaitScreen (const "GENERATING...") 1]
& uvWorld . sideEffects .~ \_ -> do
& uvIOEffects .~ \_ -> do
w <- generateWorldFromSeed i
return $ u & menuLayers .~ [] & uvWorld .~ w
& savedWorlds . at LevelStartSlot ?~ w