Start implementing attachable scroll items
This commit is contained in:
@@ -7,19 +7,18 @@ module Dodge.Data.Item.Use (
|
||||
module Dodge.Data.Item.Use,
|
||||
module Dodge.Data.Item.Use.Equipment,
|
||||
module Dodge.Data.Item.HeldUse,
|
||||
module Dodge.Data.Item.HeldScroll,
|
||||
module Dodge.Data.Item.HeldDelay,
|
||||
module Dodge.Data.Item.Use.Consumption,
|
||||
module Dodge.Data.Hammer,
|
||||
module Dodge.Data.Item.Targeting,
|
||||
) where
|
||||
|
||||
import Linear
|
||||
import Geometry.Data
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
import qualified Data.Sequence as Seq
|
||||
import Dodge.Data.Hammer
|
||||
import Dodge.Data.Item.HeldScroll
|
||||
import Dodge.Data.Item.HeldUse
|
||||
import Dodge.Data.Item.Use.Consumption
|
||||
import Dodge.Data.Item.Use.Equipment
|
||||
@@ -33,7 +32,6 @@ data ItemUse
|
||||
, _heldMods :: HeldMod
|
||||
, _heldHammer :: HammerPosition
|
||||
, _heldAim :: AimParams
|
||||
, _heldScroll :: HeldScroll
|
||||
, _heldConsumption :: HeldConsumption
|
||||
-- , _useTargeting :: Maybe TargetType
|
||||
}
|
||||
@@ -59,9 +57,20 @@ data ItemUse
|
||||
--deriving (Eq, Show, Read) --Generic, Flat)
|
||||
|
||||
data AttachParams
|
||||
= ZoomScopeParams
|
||||
= ScrollAttachParams {_scrollAttachParams :: ScrollAttachParams}
|
||||
| AmmoAttachParams
|
||||
|
||||
data ScrollAttachParams
|
||||
= ZoomScrollParams
|
||||
{ -- | a camera offset
|
||||
_opticPos :: Point2
|
||||
-- , _scopeZoomChange :: Int
|
||||
, _opticZoom :: Float
|
||||
, _opticDefaultZoom :: Float
|
||||
}
|
||||
| CharScrollParams
|
||||
{ _scrollChar :: Seq.Seq Char}
|
||||
|
||||
data ItemUse'
|
||||
= ItemHeld HeldUse'
|
||||
| ItemEquip EquipUse'
|
||||
@@ -110,8 +119,11 @@ makeLenses ''ItemUse
|
||||
makeLenses ''AimParams
|
||||
makeLenses ''ItZoom
|
||||
makeLenses ''Muzzle
|
||||
makeLenses ''AttachParams
|
||||
makeLenses ''ScrollAttachParams
|
||||
deriveJSON defaultOptions ''Muzzle
|
||||
deriveJSON defaultOptions ''AimStance
|
||||
deriveJSON defaultOptions ''ScrollAttachParams
|
||||
deriveJSON defaultOptions ''AttachParams
|
||||
deriveJSON defaultOptions ''ItZoom
|
||||
deriveJSON defaultOptions ''AimParams
|
||||
|
||||
Reference in New Issue
Block a user