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.Cloud where
|
||||
|
||||
import Flat
|
||||
import Color
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
@@ -14,7 +17,7 @@ import Data.Store
|
||||
data CloudDraw
|
||||
= CloudColor Float Float Color -- radius-multiply fade-time color
|
||||
| DrawGasCloud Color
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data Cloud = Cloud
|
||||
{ _clPos :: Point3
|
||||
@@ -25,17 +28,14 @@ data Cloud = Cloud
|
||||
, _clTimer :: Int
|
||||
, _clType :: CloudType
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data CloudType
|
||||
= SmokeCloud
|
||||
| GasCloud
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
makeLenses ''Cloud
|
||||
deriveJSON defaultOptions ''CloudDraw
|
||||
deriveJSON defaultOptions ''Cloud
|
||||
deriveJSON defaultOptions ''CloudType
|
||||
$($(derive [d| instance Deriving (Store CloudDraw) |]))
|
||||
$($(derive [d| instance Deriving (Store Cloud) |]))
|
||||
$($(derive [d| instance Deriving (Store CloudType) |]))
|
||||
|
||||
Reference in New Issue
Block a user