Add Binary instances

This commit is contained in:
2022-08-21 10:58:19 +01:00
parent 386a2b4732
commit 1ce7d4a72d
95 changed files with 345 additions and 3 deletions
+5
View File
@@ -5,6 +5,7 @@
module Dodge.Data.Item.Misc where
import Data.Binary
import Flat
import Control.Lens
import Data.Aeson
@@ -18,6 +19,7 @@ data ItemDimension = ItemDimension
, _dimAttachPos :: Point3
}
deriving (Eq, Show, Read, Generic, Flat)
instance Binary ItemDimension
data ItemPortage
= HeldItem
@@ -27,15 +29,18 @@ data ItemPortage
| WornItem
| NoPortage
deriving (Eq, Show, Read, Generic, Flat)
instance Binary ItemPortage
--data ItemValue = ItemValue
-- { _ivInt :: Int
-- , _ivType :: ItemValueType
-- }
-- deriving (Eq, Show, Read, Generic, Flat)
-- instance Binary ItemValue
--
--data ItemValueType = MundaneItem | ArtefactItem
-- deriving (Eq, Show, Read, Generic, Flat)
-- instance Binary ItemValueType
makeLenses ''ItemDimension
makeLenses ''ItemPortage