Attempt to make CWorld correct instance of Store
This commit is contained in:
@@ -3,10 +3,13 @@
|
||||
|
||||
module Dodge.Data.Creature.Memory where
|
||||
|
||||
import LinearHelp
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
import Geometry.Data
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
|
||||
data Memory = Memory
|
||||
{ _soundsToInvestigate :: [Point2]
|
||||
@@ -16,3 +19,4 @@ data Memory = Memory
|
||||
|
||||
makeLenses ''Memory
|
||||
deriveJSON defaultOptions ''Memory
|
||||
$($(derive [d| instance Deriving (Store Memory) |]))
|
||||
|
||||
@@ -6,6 +6,8 @@ module Dodge.Data.Creature.Misc (
|
||||
module Dodge.Data.CamouflageStatus,
|
||||
) where
|
||||
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
import Color
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
@@ -84,3 +86,12 @@ deriveJSON defaultOptions ''CrMvType
|
||||
deriveJSON defaultOptions ''HumanoidAI
|
||||
deriveJSON defaultOptions ''CreatureType
|
||||
deriveJSON defaultOptions ''BarrelType
|
||||
|
||||
{- FOURMOLU_DISABLE -}
|
||||
$($(derive [d| instance Deriving (Store CreatureStatistics) |]))
|
||||
$($(derive [d| instance Deriving (Store Vocalization) |]))
|
||||
$($(derive [d| instance Deriving (Store CrMvType) |]))
|
||||
$($(derive [d| instance Deriving (Store HumanoidAI) |]))
|
||||
$($(derive [d| instance Deriving (Store CreatureType) |]))
|
||||
$($(derive [d| instance Deriving (Store BarrelType) |]))
|
||||
{- FOURMOLU_ENABLE -}
|
||||
|
||||
@@ -26,6 +26,8 @@ import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
import Dodge.Data.FloatFunction
|
||||
import qualified IntMapHelp as IM
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
|
||||
data Perception = Perception
|
||||
{ _cpVigilance :: Vigilance
|
||||
@@ -75,3 +77,9 @@ deriveJSON defaultOptions ''Audition
|
||||
deriveJSON defaultOptions ''Vigilance
|
||||
deriveJSON defaultOptions ''Attention
|
||||
deriveJSON defaultOptions ''Awareness
|
||||
$($(derive [d| instance Deriving (Store Perception) |]))
|
||||
$($(derive [d| instance Deriving (Store Vision) |]))
|
||||
$($(derive [d| instance Deriving (Store Audition) |]))
|
||||
$($(derive [d| instance Deriving (Store Vigilance) |]))
|
||||
$($(derive [d| instance Deriving (Store Attention) |]))
|
||||
$($(derive [d| instance Deriving (Store Awareness) |]))
|
||||
|
||||
@@ -3,10 +3,13 @@
|
||||
|
||||
module Dodge.Data.Creature.Stance where
|
||||
|
||||
import LinearHelp
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
import Geometry.Data
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
|
||||
data Stance = Stance
|
||||
{ _carriage :: Carriage
|
||||
@@ -45,3 +48,7 @@ deriveJSON defaultOptions ''Stance
|
||||
deriveJSON defaultOptions ''Carriage
|
||||
deriveJSON defaultOptions ''FootForward
|
||||
deriveJSON defaultOptions ''Posture
|
||||
$($(derive [d| instance Deriving (Store Stance) |]))
|
||||
$($(derive [d| instance Deriving (Store Carriage) |]))
|
||||
$($(derive [d| instance Deriving (Store FootForward) |]))
|
||||
$($(derive [d| instance Deriving (Store Posture) |]))
|
||||
|
||||
@@ -10,6 +10,8 @@ import Data.Aeson.TH
|
||||
import qualified Data.IntSet as IS
|
||||
import Dodge.Data.Damage
|
||||
import Geometry.Data
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
|
||||
data CreatureState = CrSt
|
||||
{ _csDamage :: [Damage]
|
||||
@@ -58,3 +60,8 @@ deriveJSON defaultOptions ''CreatureDropType
|
||||
deriveJSON defaultOptions ''CrSpState
|
||||
deriveJSON defaultOptions ''Faction
|
||||
deriveJSON defaultOptions ''CrGroup
|
||||
$($(derive [d| instance Deriving (Store CreatureState) |]))
|
||||
$($(derive [d| instance Deriving (Store CreatureDropType) |]))
|
||||
$($(derive [d| instance Deriving (Store CrSpState) |]))
|
||||
$($(derive [d| instance Deriving (Store Faction) |]))
|
||||
$($(derive [d| instance Deriving (Store CrGroup) |]))
|
||||
|
||||
Reference in New Issue
Block a user