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.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) |]))
|
||||
|
||||
Reference in New Issue
Block a user