Move from store to flat
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
module Dodge.Data.Item.Effect where
|
||||
|
||||
import Flat
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
@@ -16,7 +19,7 @@ data ItEffect = ItEffect
|
||||
, _ieOnHeld :: ItInvEffect
|
||||
, _ieOnStash :: ItInvEffect
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data ItInvEffect
|
||||
= NoInvEffect
|
||||
@@ -26,22 +29,18 @@ data ItInvEffect
|
||||
| CreateShieldWall
|
||||
| RemoveShieldWall
|
||||
| EffectWhileHeld ItInvEffect
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data ItFloorEffect = NoFloorEffect
|
||||
| DefaultFloorEffect
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data ItDropEffect = NoDropEffect
|
||||
| DefaultDropEffect
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
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 ItInvEffect) |]))
|
||||
$($(derive [d| instance Deriving (Store ItFloorEffect) |]))
|
||||
$($(derive [d| instance Deriving (Store ItDropEffect) |]))
|
||||
|
||||
Reference in New Issue
Block a user