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.Beam where
|
||||
|
||||
import Flat
|
||||
import Color
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
@@ -28,12 +31,12 @@ data Beam = Beam
|
||||
, _bmOrigin :: Maybe Int
|
||||
, _bmType :: BeamType
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data BeamDraw
|
||||
= BasicBeamDraw
|
||||
| BeamDrawColor Color
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data BeamCombineType
|
||||
= FlameBeamCombine
|
||||
@@ -41,14 +44,14 @@ data BeamCombineType
|
||||
| TeslaBeamCombine
|
||||
| SplitBeamCombine
|
||||
| NoBeamCombine
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data BeamType
|
||||
= BeamCombine
|
||||
{ _beamCombine :: BeamCombineType -- (Point2 , (Point2,Point2,Beam) , (Point2,Point2,Beam)) -> World -> World
|
||||
}
|
||||
| BeamSimple
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
makeLenses ''BeamType
|
||||
makeLenses ''Beam
|
||||
@@ -56,7 +59,3 @@ deriveJSON defaultOptions ''BeamType
|
||||
deriveJSON defaultOptions ''Beam
|
||||
deriveJSON defaultOptions ''BeamDraw
|
||||
deriveJSON defaultOptions ''BeamCombineType
|
||||
$($(derive [d| instance Deriving (Store BeamType) |]))
|
||||
$($(derive [d| instance Deriving (Store Beam) |]))
|
||||
$($(derive [d| instance Deriving (Store BeamDraw) |]))
|
||||
$($(derive [d| instance Deriving (Store BeamCombineType) |]))
|
||||
|
||||
Reference in New Issue
Block a user