Add Binary instances
This commit is contained in:
@@ -17,6 +17,7 @@ module Dodge.Data.Creature (
|
||||
module Dodge.Data.Hammer,
|
||||
) where
|
||||
|
||||
import Data.Binary
|
||||
import Flat
|
||||
import LinearHelp ()
|
||||
import Control.Lens
|
||||
@@ -76,9 +77,11 @@ data Creature = Creature
|
||||
, _crCamouflage :: CamouflageStatus
|
||||
}
|
||||
deriving (Eq, Show, Read, Generic, Flat)
|
||||
instance Binary Creature
|
||||
|
||||
data CreatureCorpse = MakeDefaultCorpse
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary CreatureCorpse
|
||||
|
||||
data Intention = Intention
|
||||
{ _targetCr :: Maybe Creature
|
||||
@@ -86,6 +89,7 @@ data Intention = Intention
|
||||
, _viewPoint :: Maybe Point2
|
||||
}
|
||||
deriving (Eq, Show, Read, Generic, Flat)
|
||||
instance Binary Intention
|
||||
|
||||
crSel :: Creature -> Int
|
||||
crSel = _iselPos . _crInvSel
|
||||
|
||||
Reference in New Issue
Block a user