Refactor, try to limit dependencies

This commit is contained in:
2022-07-28 00:59:56 +01:00
parent 8aa5c17ab9
commit 160560af5f
418 changed files with 15104 additions and 13342 deletions
+22 -23
View File
@@ -1,31 +1,30 @@
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE StrictData #-}
module Dodge.Data.Shockwave
where
import GHC.Generics
import Data.Aeson
{-# LANGUAGE TemplateHaskell #-}
module Dodge.Data.Shockwave where
import Color
import Geometry.Data
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
import Geometry.Data
data ShockwaveDirection = OutwardShockwave | InwardShockwave
deriving (Eq,Ord,Show,Read,Generic)
instance ToJSON ShockwaveDirection where
toEncoding = genericToEncoding defaultOptions
instance FromJSON ShockwaveDirection
deriving (Eq, Ord, Show, Read)
data Shockwave = Shockwave
{ _swColor :: Color
, _swDirection :: ShockwaveDirection
{ _swColor :: Color
, _swDirection :: ShockwaveDirection
, _swInvulnerableCrs :: [Int]
, _swPos :: Point2
, _swRad :: Float
, _swDam :: Int
, _swPush :: Float
, _swMaxTime :: Int
, _swTimer :: Int
, _swPos :: Point2
, _swRad :: Float
, _swDam :: Int
, _swPush :: Float
, _swMaxTime :: Int
, _swTimer :: Int
}
deriving (Eq,Ord,Show,Read,Generic)
instance ToJSON Shockwave where
toEncoding = genericToEncoding defaultOptions
instance FromJSON Shockwave
deriving (Eq, Ord, Show, Read)
makeLenses ''Shockwave
deriveJSON defaultOptions ''ShockwaveDirection
deriveJSON defaultOptions ''Shockwave