Move from store to flat

This commit is contained in:
2022-08-20 17:54:35 +01:00
parent 8571ab9254
commit ff9dbdf068
95 changed files with 793 additions and 748 deletions
+7 -8
View File
@@ -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) |]))