Move from store to flat
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
module Dodge.Data.Creature.State where
|
||||
|
||||
import Flat
|
||||
import Color
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
import qualified Data.IntSet as IS
|
||||
import qualified IntSetHelp as IS
|
||||
import Dodge.Data.Damage
|
||||
import Geometry.Data
|
||||
import TH.Derive
|
||||
@@ -18,18 +21,18 @@ data CreatureState = CrSt
|
||||
, _csSpState :: CrSpState
|
||||
, _csDropsOnDeath :: CreatureDropType
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data CreatureDropType
|
||||
= DropAll
|
||||
| DropAmount Int
|
||||
| DropSpecific [Int]
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data CrSpState
|
||||
= Barrel {_piercedPoints :: [Point2]}
|
||||
| GenCr
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data Faction
|
||||
= GenericFaction Int
|
||||
@@ -40,7 +43,7 @@ data Faction
|
||||
| NoFaction
|
||||
| ColorFaction Color
|
||||
| PlayerFaction
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data CrGroup
|
||||
= LoneWolf
|
||||
@@ -50,7 +53,7 @@ data CrGroup
|
||||
}
|
||||
| CrGroupID {_crGroupID :: Int}
|
||||
| ShieldGroup
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
makeLenses ''CreatureState
|
||||
makeLenses ''CrSpState
|
||||
@@ -60,8 +63,3 @@ 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