Cleanup
This commit is contained in:
@@ -1,43 +0,0 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
module Dodge.Item.Attachment.Data
|
||||
where
|
||||
import GHC.Generics
|
||||
import Data.Aeson
|
||||
import Geometry.Data
|
||||
import Control.Lens
|
||||
import qualified Data.Sequence as Seq
|
||||
data ItAttachment
|
||||
= AttachFuse {_atFuseTime :: Int}
|
||||
| AttachMode {_atMode :: Int}
|
||||
| AttachCharMode {_atCharMode :: Seq.Seq Char }
|
||||
| AttachTargetPos { _atTargetPos :: Point2 }
|
||||
| AttachInt { _atInt :: Int }
|
||||
| AttachMInt { _atMInt :: Maybe Int }
|
||||
| AttachFloat { _atFloat :: Float }
|
||||
| AttachBool { _atBool :: Bool }
|
||||
| NoItAttachment
|
||||
deriving (Eq,Ord,Show,Read,Generic)
|
||||
instance ToJSON ItAttachment where
|
||||
toEncoding = genericToEncoding defaultOptions
|
||||
instance FromJSON ItAttachment
|
||||
data Scope = NoScope
|
||||
| RemoteScope
|
||||
{_scopePos :: Point2 -- ^ a camera offset
|
||||
,_scopeZoom :: Float
|
||||
,_scopeIsCamera :: Bool -- ^ if the camera offset is also the center of vision
|
||||
}
|
||||
| ZoomScope
|
||||
{_scopePos :: Point2 -- ^ a camera offset
|
||||
,_scopeZoomChange :: Int
|
||||
,_scopeZoom :: Float
|
||||
,_scopeDefaultZoom :: Float
|
||||
,_scopeIsCamera :: Bool -- ^ if the camera offset is also the center of vision
|
||||
}
|
||||
deriving (Eq,Ord,Show,Read,Generic)
|
||||
instance ToJSON Scope where
|
||||
toEncoding = genericToEncoding defaultOptions
|
||||
instance FromJSON Scope
|
||||
makeLenses ''ItAttachment
|
||||
makeLenses ''Scope
|
||||
@@ -1,14 +0,0 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
--{-# LANGUAGE TemplateHaskell #-}
|
||||
module Dodge.Item.Data where
|
||||
import GHC.Generics
|
||||
import Data.Aeson
|
||||
data CurseStatus
|
||||
= Uncursed
|
||||
| UndroppableIdentified
|
||||
| UndroppableUnidentified
|
||||
deriving (Eq,Ord,Show,Read,Generic)
|
||||
instance ToJSON CurseStatus where
|
||||
toEncoding = genericToEncoding defaultOptions
|
||||
instance FromJSON CurseStatus
|
||||
Reference in New Issue
Block a user