Refactor concurrent side effects

This commit is contained in:
2022-10-30 14:55:30 +00:00
parent 11e873ea48
commit 624a4c3bcd
10 changed files with 56 additions and 47 deletions
-5
View File
@@ -93,7 +93,6 @@ updateUniverseLast = over uvWorld (input . mouseButtons . each .~ True) -- to de
{- For most menus the only way to change the world is using event handling. -}
updateUniverseMid :: Universe -> Universe
updateUniverseMid u
| concurrentblocking = u
| otherwise = case _uvScreenLayers u of
(OptionScreen{_scOptionFlag = GameOverOptions} : _) ->
u & uvWorld
@@ -106,10 +105,6 @@ updateUniverseMid u
)
(_ : _) -> u
[] -> functionalUpdate'' u
where
concurrentblocking = case u ^. uvConcEffects of
BlockingConcEffect{} -> True
_ -> False
functionalUpdate'' :: Universe -> Universe
functionalUpdate'' = advanceScrollAmount . functionalUpdate'