Refactor, try to limit dependencies
This commit is contained in:
@@ -1,31 +1,30 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
module Dodge.Data.Modification
|
||||
where
|
||||
-- this naming is not good, parameterized world effect?
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
module Dodge.Data.Modification where
|
||||
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
import Dodge.Data.WorldEffect
|
||||
import Geometry.Data
|
||||
import Control.Lens
|
||||
import GHC.Generics
|
||||
import Data.Aeson
|
||||
|
||||
data Modification
|
||||
= ModIDTimerPoint3Bool
|
||||
{ _mdID :: Int
|
||||
{ _mdID :: Int
|
||||
, _mdExternalID :: Int
|
||||
, _mdUpdate :: MdWdWd
|
||||
, _mdTimer :: Int
|
||||
, _mdTimer :: Int
|
||||
, _mdPoint3 :: Point3
|
||||
, _mdBool :: Bool
|
||||
, _mdBool :: Bool
|
||||
}
|
||||
| ModIDID
|
||||
{ _mdID :: Int
|
||||
{ _mdID :: Int
|
||||
, _mdExternalID1 :: Int
|
||||
, _mdExternalID2 :: Int
|
||||
, _mdUpdate :: MdWdWd
|
||||
}
|
||||
deriving (Eq,Ord,Show,Read,Generic)
|
||||
instance ToJSON Modification where
|
||||
toEncoding = genericToEncoding defaultOptions
|
||||
instance FromJSON Modification
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
|
||||
makeLenses ''Modification
|
||||
deriveJSON defaultOptions ''Modification
|
||||
|
||||
Reference in New Issue
Block a user