Allow for creature death sounds
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
{-# LANGUAGE LambdaCase #-}
|
||||
module Dodge.Creature.Vocalization (
|
||||
crWarningSounds,
|
||||
crDeathSounds,
|
||||
vocalizationTest,
|
||||
resetCrVocCoolDown,
|
||||
) where
|
||||
@@ -39,6 +41,23 @@ crWarningSounds cr = case cr ^. crType of
|
||||
BarrelCrit{} -> mempty
|
||||
LampCrit{} -> mempty
|
||||
|
||||
crDeathSounds :: Creature -> DeathType -> [SoundID]
|
||||
crDeathSounds cr dt = case cr ^. crType of
|
||||
Avatar{} -> mempty
|
||||
AvatarDead -> mempty
|
||||
ChaseCrit{} -> defaultDeathSounds dt
|
||||
SwarmCrit -> mempty
|
||||
AutoCrit -> mempty
|
||||
BarrelCrit{} -> mempty
|
||||
LampCrit{} -> mempty
|
||||
|
||||
defaultDeathSounds :: DeathType -> [SoundID]
|
||||
defaultDeathSounds = \case
|
||||
CookDeath -> mempty
|
||||
PoisonDeath -> mempty
|
||||
PlainDeath -> mempty
|
||||
GibsDeath -> mempty
|
||||
|
||||
vocalizationTest :: Creature -> Maybe SoundID
|
||||
vocalizationTest cr = case cr ^? crVocalization . vcCoolDown of
|
||||
Just 0 -> crVocalizationSound cr
|
||||
|
||||
Reference in New Issue
Block a user