Add Store instances
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
|
||||
module Dodge.Data.HUD where
|
||||
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
import Data.Binary
|
||||
import Flat
|
||||
import LinearHelp ()
|
||||
@@ -17,7 +19,6 @@ data HUDElement
|
||||
= DisplayInventory {_subInventory :: SubInventory}
|
||||
| DisplayCarte
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary HUDElement
|
||||
|
||||
data SubInventory
|
||||
= NoSubInventory
|
||||
@@ -27,7 +28,7 @@ data SubInventory
|
||||
| LockedInventory
|
||||
| DisplayTerminal {_termID :: Int}
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary SubInventory
|
||||
$($(derive [d| instance Deriving (Store SubInventory) |]))
|
||||
|
||||
data HUD = HUD
|
||||
{ _hudElement :: HUDElement
|
||||
@@ -36,7 +37,7 @@ data HUD = HUD
|
||||
, _carteRot :: Float
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary HUD
|
||||
$($(derive [d| instance Deriving (Store HUD ) |]))
|
||||
|
||||
makeLenses ''HUD
|
||||
makeLenses ''HUDElement
|
||||
@@ -44,3 +45,4 @@ makeLenses ''SubInventory
|
||||
deriveJSON defaultOptions ''HUDElement
|
||||
deriveJSON defaultOptions ''SubInventory
|
||||
deriveJSON defaultOptions ''HUD
|
||||
$($(derive [d| instance Deriving (Store HUDElement) |]))
|
||||
|
||||
Reference in New Issue
Block a user