Refactor material sounds

This commit is contained in:
2022-06-19 21:21:33 +01:00
parent 08e5df07e2
commit 8d81104f5f
14 changed files with 236 additions and 231 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ module Dodge.Creature.Lamp
, colorLamp
) where
import Dodge.Data
import Dodge.Material
import Dodge.Default
import Dodge.Creature.Picture
import Dodge.LightSource
@@ -57,7 +58,7 @@ updateLamp :: Float -> Int -> Creature -> World -> World
updateLamp h i cr w
| _crHP cr < 0 = w
& explosionFlashAt cpos
& mkSoundBreakGlass cpos
& originsIDsAt [MaterialSound Glass n | n <- [0,1,2]] (destroyMatS Glass) cpos
& lightSources . at i .~ Nothing
& creatures . at cid .~ Nothing
| otherwise = w