Attempt to make CWorld correct instance of Store

This commit is contained in:
2022-08-20 15:53:37 +01:00
parent e1a555ea02
commit 8571ab9254
89 changed files with 570 additions and 19 deletions
+8
View File
@@ -6,6 +6,8 @@ module Dodge.Data.Item.Effect where
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
import TH.Derive
import Data.Store
data ItEffect = ItEffect
{ _ieInv :: ItInvEffect --Item -> Creature -> World -> World
@@ -27,9 +29,11 @@ data ItInvEffect
deriving (Eq, Ord, Show, Read)
data ItFloorEffect = NoFloorEffect
| DefaultFloorEffect
deriving (Eq, Ord, Show, Read)
data ItDropEffect = NoDropEffect
| DefaultDropEffect
deriving (Eq, Ord, Show, Read)
makeLenses ''ItEffect
@@ -37,3 +41,7 @@ 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) |]))