Move from store to flat
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
@@ -15,6 +17,7 @@ module Dodge.Data.Creature (
|
||||
module Dodge.Data.Hammer,
|
||||
) where
|
||||
|
||||
import Flat
|
||||
import LinearHelp
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
@@ -74,18 +77,17 @@ data Creature = Creature
|
||||
, _crStatistics :: CreatureStatistics
|
||||
, _crCamouflage :: CamouflageStatus
|
||||
}
|
||||
deriving (Eq, Show, Read)
|
||||
deriving (Eq, Show, Read, Generic, Flat)
|
||||
|
||||
data CreatureCorpse = MakeDefaultCorpse
|
||||
| HackDefaultCorpse
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data Intention = Intention
|
||||
{ _targetCr :: Maybe Creature
|
||||
, _mvToPoint :: Maybe Point2
|
||||
, _viewPoint :: Maybe Point2
|
||||
}
|
||||
deriving (Eq, Show, Read)
|
||||
deriving (Eq, Show, Read, Generic, Flat)
|
||||
|
||||
crSel :: Creature -> Int
|
||||
crSel = _iselPos . _crInvSel
|
||||
@@ -95,15 +97,3 @@ makeLenses ''Intention
|
||||
deriveJSON defaultOptions ''Creature
|
||||
deriveJSON defaultOptions ''CreatureCorpse
|
||||
deriveJSON defaultOptions ''Intention
|
||||
|
||||
{- FOURMOLU_DISABLE -}
|
||||
$($(derive [d|
|
||||
instance Deriving (Store Intention)
|
||||
|]))
|
||||
$($(derive [d|
|
||||
instance Deriving (Store CreatureCorpse)
|
||||
|]))
|
||||
$($(derive [d|
|
||||
instance Deriving (Store Creature)
|
||||
|]))
|
||||
{- FOURMOLU_ENABLE -}
|
||||
|
||||
Reference in New Issue
Block a user