Refactor, try to limit dependencies

This commit is contained in:
2022-07-28 00:59:56 +01:00
parent 8aa5c17ab9
commit 160560af5f
418 changed files with 15104 additions and 13342 deletions
+4 -4
View File
@@ -1,15 +1,15 @@
module Dodge.Creature.Vocalization where
import Dodge.Data
import Sound.Data
import Control.Lens
import Dodge.Data.Creature
import Sound.Data
vocalizationTest :: Creature -> Maybe SoundID
vocalizationTest cr = case cr ^? crVocalization . vcCoolDown of
Just 0 -> Just $ _vcSound $ _crVocalization cr
_ -> Nothing
_ -> Nothing
resetCrVocCoolDown :: Creature -> Creature
resetCrVocCoolDown cr = case cr ^? crVocalization . vcMaxCoolDown of
Just i -> cr & crVocalization . vcCoolDown .~ i
Just i -> cr & crVocalization . vcCoolDown .~ i
Nothing -> cr