Move from store to flat
This commit is contained in:
+8
-12
@@ -1,3 +1,5 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
@@ -6,15 +8,14 @@ module Dodge.Data.Wall (
|
||||
module Dodge.Data.Material,
|
||||
) where
|
||||
|
||||
import LinearHelp
|
||||
import Flat
|
||||
import LinearHelp ()
|
||||
import Color
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
import Dodge.Data.Material
|
||||
import Geometry
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
|
||||
data Wall = Wall
|
||||
{ _wlLine :: (Point2, Point2)
|
||||
@@ -35,18 +36,17 @@ data Wall = Wall
|
||||
, _wlHeight :: Float
|
||||
, _wlMaterial :: Material
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data Opacity
|
||||
= SeeThrough
|
||||
| SeeAbove
|
||||
| DrawnWall {_opDraw :: WallDraw} -- Wall -> SPic
|
||||
| Opaque
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data WallDraw = DrawForceField
|
||||
| HackWallDraw
|
||||
deriving (Eq, Ord, Show, Read, Enum, Bounded)
|
||||
deriving (Eq, Ord, Show, Read, Enum, Bounded, Generic, Flat)
|
||||
|
||||
data WallStructure
|
||||
= StandaloneWall
|
||||
@@ -56,7 +56,7 @@ data WallStructure
|
||||
| CreaturePart
|
||||
{ _wlStCreature :: Int
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
makeLenses ''Wall
|
||||
makeLenses ''Opacity
|
||||
@@ -65,7 +65,3 @@ deriveJSON defaultOptions ''Wall
|
||||
deriveJSON defaultOptions ''Opacity
|
||||
deriveJSON defaultOptions ''WallDraw
|
||||
deriveJSON defaultOptions ''WallStructure
|
||||
$($(derive [d| instance Deriving (Store Wall) |]))
|
||||
$($(derive [d| instance Deriving (Store Opacity) |]))
|
||||
$($(derive [d| instance Deriving (Store WallDraw) |]))
|
||||
$($(derive [d| instance Deriving (Store WallStructure) |]))
|
||||
|
||||
Reference in New Issue
Block a user