Add sound on spawn, allow for filtering of to play sounds

This commit is contained in:
2025-12-05 23:19:06 +00:00
parent a4f8369420
commit f9ce58b409
19 changed files with 752 additions and 695 deletions
+12
View File
@@ -0,0 +1,12 @@
module Dodge.SoundSelection (newSoundsToPlay) where
import Sound.Data
import Dodge.Data.Universe
import qualified Data.Map.Strict as M
import Control.Lens
newSoundsToPlay :: Universe -> M.Map SoundOrigin Sound
newSoundsToPlay u = case u ^. uvWorld . wSoundFilter of
NoSoundFilter -> u ^. uvWorld . toPlaySounds
FilterBySoundOrigin ks -> (u ^. uvWorld . toPlaySounds) `M.restrictKeys` ks