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.HUD where
|
||||
|
||||
import Flat
|
||||
import LinearHelp
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
@@ -14,7 +17,7 @@ import Data.Store
|
||||
data HUDElement
|
||||
= DisplayInventory {_subInventory :: SubInventory}
|
||||
| DisplayCarte
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data SubInventory
|
||||
= NoSubInventory
|
||||
@@ -23,7 +26,7 @@ data SubInventory
|
||||
| InspectInventory
|
||||
| LockedInventory
|
||||
| DisplayTerminal {_termID :: Int}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data HUD = HUD
|
||||
{ _hudElement :: HUDElement
|
||||
@@ -31,7 +34,7 @@ data HUD = HUD
|
||||
, _carteZoom :: Float
|
||||
, _carteRot :: Float
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
makeLenses ''HUD
|
||||
makeLenses ''HUDElement
|
||||
@@ -39,6 +42,3 @@ makeLenses ''SubInventory
|
||||
deriveJSON defaultOptions ''HUDElement
|
||||
deriveJSON defaultOptions ''SubInventory
|
||||
deriveJSON defaultOptions ''HUD
|
||||
$($(derive [d| instance Deriving (Store HUDElement) |]))
|
||||
$($(derive [d| instance Deriving (Store SubInventory) |]))
|
||||
$($(derive [d| instance Deriving (Store HUD) |]))
|
||||
|
||||
Reference in New Issue
Block a user