Refactor light sources

This commit is contained in:
2022-07-21 16:21:35 +01:00
parent cf5ec4a261
commit aabd8a2cb8
8 changed files with 71 additions and 45 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ Description : Simulation update
module Dodge.Update ( updateUniverse ) where
import Dodge.Data
import Dodge.Beam
import Dodge.LightSource.Update
import Dodge.Projectile.Update
import Dodge.Creature.Update
import Dodge.RadarSweep
@@ -209,7 +210,7 @@ updateDistortions = distortions %~ mapMaybe updateDistortion
updateLightSources :: World -> World
updateLightSources = tempLightSources %~ f
where
f = mapMaybe (\b -> _tlsUpdate b b)
f = mapMaybe (\b -> updateTempLightSource (_tlsUpdate b) b)
updateRadarBlips :: World -> World
updateRadarBlips = radarBlips %~ mapMaybe updateRadarBlip