Make creature vocalizations stop on death

This commit is contained in:
2021-11-18 02:42:12 +00:00
parent f6d5d5a201
commit 94552ff658
7 changed files with 43 additions and 13 deletions
+1 -4
View File
@@ -3,6 +3,7 @@ module Dodge.Creature.Impulse
)
where
import Dodge.Data
import Dodge.Creature.Vocalization
import Dodge.Data.SoundOrigin
import Dodge.Creature.Impulse.Movement
import Dodge.Creature.Impulse.UseItem
@@ -86,7 +87,3 @@ followImpulse cr w imp = case imp of
. soundStart (CrSound cid) cpos hitS Nothing
addDam i dams = Blunt 100 cpos (posFromID i) (posFromID i) : dams
resetCrVocCoolDown :: Creature -> Creature
resetCrVocCoolDown cr = case cr ^? crVocalization . vcMaxCoolDown of
Just i -> cr & crVocalization . vcCoolDown .~ i
Nothing -> cr