Work on cleaning up item effects/attachments etc

This commit is contained in:
2022-07-27 16:39:58 +01:00
parent 8d17ce66e9
commit b52adddd5d
39 changed files with 696 additions and 844 deletions
+32
View File
@@ -0,0 +1,32 @@
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
module Dodge.Data.Item.Scope where
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
import Geometry.Data
data Scope
= NoScope
| RemoteScope
{ -- | a camera offset
_scopePos :: Point2
, _scopeZoom :: Float
, -- | if the camera offset is also the center of vision
_scopeIsCamera :: Bool
}
| ZoomScope
{ -- | a camera offset
_scopePos :: Point2
, _scopeZoomChange :: Int
, _scopeZoom :: Float
, _scopeDefaultZoom :: Float
, -- | if the camera offset is also the center of vision
_scopeIsCamera :: Bool
}
deriving (Eq, Show, Read)
makeLenses ''Scope
deriveJSON defaultOptions ''Scope