Add Store instances
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
|
||||
module Dodge.Data.Item.Effect where
|
||||
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
import Data.Binary
|
||||
import Flat
|
||||
import Control.Lens
|
||||
@@ -19,7 +21,6 @@ data ItEffect = ItEffect
|
||||
, _ieOnStash :: ItInvEffect
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary ItEffect
|
||||
|
||||
data ItInvEffect
|
||||
= NoInvEffect
|
||||
@@ -30,18 +31,21 @@ data ItInvEffect
|
||||
| RemoveShieldWall
|
||||
| EffectWhileHeld ItInvEffect
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary ItInvEffect
|
||||
$($(derive [d| instance Deriving (Store ItInvEffect) |]))
|
||||
|
||||
data ItFloorEffect = NoFloorEffect
|
||||
| HackItFloorEffect
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary ItFloorEffect
|
||||
|
||||
data ItDropEffect = NoDropEffect
|
||||
| HackItDropEffect
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary ItDropEffect
|
||||
|
||||
makeLenses ''ItEffect
|
||||
deriveJSON defaultOptions ''ItEffect
|
||||
deriveJSON defaultOptions ''ItInvEffect
|
||||
deriveJSON defaultOptions ''ItFloorEffect
|
||||
deriveJSON defaultOptions ''ItDropEffect
|
||||
$($(derive [d| instance Deriving (Store ItEffect ) |]))
|
||||
$($(derive [d| instance Deriving (Store ItDropEffect ) |]))
|
||||
$($(derive [d| instance Deriving (Store ItFloorEffect ) |]))
|
||||
|
||||
Reference in New Issue
Block a user