Work towards making world read/showable

This commit is contained in:
2022-07-22 11:16:12 +01:00
parent 6b69fc1684
commit 7fdb70dd1c
22 changed files with 223 additions and 218 deletions
+48 -50
View File
@@ -56,61 +56,59 @@ updateUniverse u = case _menuLayers u of
. updateLightSources
. updateClouds )
(_ : _) -> u
[] -> over uvWorld (functionalUpdate (_config u)) u
[] -> functionalUpdate u
{- | The update step. -}
functionalUpdate :: Configuration -> World -> World
functionalUpdate cfig w = checkEndGame
functionalUpdate :: Universe -> Universe
functionalUpdate w = over uvWorld checkEndGame
-- . updateRandGen
. (mouseButtons . each .~ True) -- to determine if the mouse button is held
. (worldClock +~ 1)
. updateWorldSelect
. doRewind
. (hammers . each %~ moveHammerUp)
. updateDistortions
. updateCreatureSoundPositions
. ppEvents
. updateCamera cfig
. colCrsWalls cfig
. simpleCrSprings
. zoneCreatures
. updateIMl _doors _drMech
. updateDelayedEvents
. resetWorldEvents
. dbArg _worldEvents
. updateIMl _modifications _mdUpdate
. updateSparks
. updateRadarSweeps
. updatePosEvents
. updateFlames
. updateEnergyBalls
. updateParticles
. updateBullets
. updateRadarBlips
. updateFlares
. updateBeams
. updateIMl _props _pjUpdate
. updateIMl' _projectiles updateProjectile
. updateLightSources
. updateClouds
. updateGusts
. zoneClouds
. updateMIM magnets _mgUpdate
. updateIMl' _terminals tmUpdate
. over uvWorld (mouseButtons . each .~ True) -- to determine if the mouse button is held
. over uvWorld (worldClock +~ 1)
. over uvWorld updateWorldSelect
. over uvWorld doRewind
. over uvWorld (hammers . each %~ moveHammerUp)
. over uvWorld updateDistortions
. over uvWorld updateCreatureSoundPositions
. over uvWorld ppEvents
. updateCamera
. colCrsWalls
. over uvWorld (simpleCrSprings )
. over uvWorld (zoneCreatures )
. over uvWorld (updateIMl _doors _drMech )
. over uvWorld (updateDelayedEvents )
. over uvWorld (resetWorldEvents )
. over uvWorld (dbArg _worldEvents )
. over uvWorld (updateIMl _modifications _mdUpdate )
. over uvWorld (updateSparks )
. over uvWorld (updateRadarSweeps )
. over uvWorld (updatePosEvents )
. over uvWorld (updateFlames )
. over uvWorld (updateEnergyBalls )
. over uvWorld (updateParticles )
. over uvWorld (updateBullets )
. over uvWorld (updateRadarBlips )
. over uvWorld (updateFlares )
. over uvWorld (updateBeams )
. over uvWorld (updateIMl _props _pjUpdate )
. over uvWorld (updateIMl' _projectiles updateProjectile)
. over uvWorld (updateLightSources )
. over uvWorld (updateClouds )
. over uvWorld (updateGusts )
. over uvWorld (zoneClouds )
. over uvWorld (updateMIM magnets _mgUpdate )
. over uvWorld (updateIMl' _terminals tmUpdate )
-- . updateIMl _machines mcChooseUpdate
. updateIMl' _machines updateMachine
. updateIMl' _creatures updateCreature
. over uvWorld (updateIMl' _machines updateMachine )
. over uvWorld (updateIMl' _creatures updateCreature )
-- creatures should be updated early so that crOldPos is set before any position change
. over creatures (fmap setOldPos)
. updateCreatureGroups
-- . updateBlocks
. updateWallDamages
. updateSeenWalls
-- . (youHammerPosition %~ moveHammerUp)
. updateTerminal
. updateRBList
. updateBounds cfig -- where should this go? next to update camera?
$ updateCloseObjects w
. over (uvWorld . creatures) (fmap setOldPos)
. over uvWorld updateCreatureGroups
. over uvWorld updateWallDamages
. over uvWorld updateSeenWalls
. over uvWorld updateTerminal
. over uvWorld updateRBList
. updateBounds -- where should this go? next to update camera?
$ over uvWorld updateCloseObjects w
zoneClouds :: World -> World
zoneClouds w = w