Cleanup, add spark to bullet turret hit

This commit is contained in:
2022-02-13 17:51:15 +00:00
parent 40f1d987cb
commit 4f0f8cb4c2
7 changed files with 25 additions and 29 deletions
+2 -2
View File
@@ -11,11 +11,11 @@ import Dodge.Wall.Dust
import Dodge.Particle.Spark
import Geometry
import Color
import LensHelp
import Control.Lens
damageWall :: DamageType -> Wall -> World -> World
damageWall dt wl = case _wlStructure wl of
MachinePart mcid -> machines . ix mcid . mcDamage %~ (dt :)
MachinePart mcid -> wallEff dt wl . (machines . ix mcid . mcDamage .:~ dt)
BlockPart blid -> wallEff dt wl . (blocks . ix blid %~ damageBlockWith dt)
CreaturePart crid f -> f dt wl crid
_ -> wallEff dt wl