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.Misc where
import Flat
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
@@ -16,7 +19,7 @@ data ItemDimension = ItemDimension
, _dimCenter :: Point3
, _dimAttachPos :: Point3
}
deriving (Eq, Show, Read)
deriving (Eq, Show, Read, Generic, Flat)
data ItemPortage
= HeldItem
@@ -25,16 +28,16 @@ data ItemPortage
}
| WornItem
| NoPortage
deriving (Eq, Show, Read)
deriving (Eq, Show, Read, Generic, Flat)
data ItemValue = ItemValue
{ _ivInt :: Int
, _ivType :: ItemValueType
}
deriving (Eq, Show, Read)
deriving (Eq, Show, Read, Generic, Flat)
data ItemValueType = MundaneItem | ArtefactItem
deriving (Eq, Show, Read)
deriving (Eq, Show, Read, Generic, Flat)
makeLenses ''ItemDimension
makeLenses ''ItemPortage
@@ -43,7 +46,3 @@ deriveJSON defaultOptions ''ItemDimension
deriveJSON defaultOptions ''ItemPortage
deriveJSON defaultOptions ''ItemValue
deriveJSON defaultOptions ''ItemValueType
$($(derive [d| instance Deriving (Store ItemDimension) |]))
$($(derive [d| instance Deriving (Store ItemPortage) |]))
$($(derive [d| instance Deriving (Store ItemValue) |]))
$($(derive [d| instance Deriving (Store ItemValueType) |]))