{-# LANGUAGE StrictData #-} {-# LANGUAGE TemplateHaskell #-} module Dodge.Data.Cloud where import Dodge.Data.Material import Control.Lens import Data.Aeson import Data.Aeson.TH import Geometry data Cloud = Cloud { _clPos :: Point3 , _clVel :: Point3 , _clTimer :: Int , _clType :: CloudType } deriving (Eq, Ord, Show, Read) --Generic, Flat) data CloudType = Smoke | RocketSmoke | CryoReleaseCloud deriving (Eq, Ord, Show, Read) --Generic, Flat) data Dust = Dust { _dsPos :: Point3 , _dsVel :: Point3 , _dsTimer :: Int , _dsType :: Material } deriving (Eq, Ord, Show, Read) --Generic, Flat) data Gas = Gas { _gsPos :: Point3 , _gsVel :: Point3 , _gsTimer :: Int , _gsType :: GasType } deriving (Eq, Ord, Show, Read) --Generic, Flat) data GasType = PoisonGas deriving (Eq, Ord, Show, Read) --Generic, Flat) data BeePheremone = BPheremone { _bpPos :: Point2 , _bpTimer :: Int } makeLenses ''Cloud makeLenses ''BeePheremone deriveJSON defaultOptions ''CloudType deriveJSON defaultOptions ''Cloud deriveJSON defaultOptions ''BeePheremone makeLenses ''Dust deriveJSON defaultOptions ''Dust makeLenses ''Gas deriveJSON defaultOptions ''GasType deriveJSON defaultOptions ''Gas