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.PressPlate where
|
||||
|
||||
import Flat
|
||||
import LinearHelp
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
@@ -15,7 +18,7 @@ import Data.Store
|
||||
data PressPlateEvent
|
||||
= PressPlateId
|
||||
| PPLevelReset
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data PressPlate = PressPlate
|
||||
{ _ppPict :: Picture
|
||||
@@ -25,10 +28,8 @@ data PressPlate = PressPlate
|
||||
, _ppID :: Int
|
||||
, _ppText :: String
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
makeLenses ''PressPlate
|
||||
deriveJSON defaultOptions ''PressPlateEvent
|
||||
deriveJSON defaultOptions ''PressPlate
|
||||
$($(derive [d| instance Deriving (Store PressPlateEvent) |]))
|
||||
$($(derive [d| instance Deriving (Store PressPlate) |]))
|
||||
|
||||
Reference in New Issue
Block a user