Cleanup
This commit is contained in:
+1
-19
@@ -5,7 +5,6 @@ module Dodge.Data.Item (
|
||||
module Dodge.Data.Item,
|
||||
module Dodge.Data.Item.Effect,
|
||||
module Dodge.Data.Item.Misc,
|
||||
module Dodge.Data.Item.Tweak,
|
||||
module Dodge.Data.Item.Params,
|
||||
module Dodge.Data.Item.Use,
|
||||
module Dodge.Data.Item.CurseStatus,
|
||||
@@ -17,7 +16,6 @@ module Dodge.Data.Item (
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
import Data.Set (Set)
|
||||
import Dodge.Data.Item.Combine
|
||||
import Dodge.Data.Item.CurseStatus
|
||||
import Dodge.Data.Item.Effect
|
||||
@@ -25,12 +23,10 @@ import Dodge.Data.Item.Location
|
||||
import Dodge.Data.Item.Misc
|
||||
import Dodge.Data.Item.Params
|
||||
import Dodge.Data.Item.Scope
|
||||
import Dodge.Data.Item.Tweak
|
||||
import Dodge.Data.Item.Use
|
||||
import NewInt
|
||||
|
||||
data ItID = ItID
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
data ItID = ItID deriving (Eq, Ord, Show, Read)
|
||||
|
||||
data Item = Item
|
||||
{ _itUse :: ItemUse
|
||||
@@ -41,23 +37,9 @@ data Item = Item
|
||||
, _itInvSize :: Int
|
||||
, _itDimension :: ItemDimension
|
||||
, _itCurseStatus :: CurseStatus
|
||||
-- , _itTweaks :: ItemTweaks
|
||||
, _itParams :: ItemParams
|
||||
, _itAttachments :: Set ItemAttachment
|
||||
}
|
||||
|
||||
data ItemAttachment
|
||||
= ScopeAttachment
|
||||
| BulletClipAttachment
|
||||
| BulletBeltAttachment
|
||||
| StandAttachment
|
||||
| PowerSourceAttachment
|
||||
deriving (Eq, Ord)
|
||||
|
||||
_itUseAimStance :: Item -> AimStance
|
||||
_itUseAimStance = _aimStance . _heldAim . _itUse
|
||||
|
||||
makeLenses ''Item
|
||||
deriveJSON defaultOptions ''ItID
|
||||
deriveJSON defaultOptions ''ItemAttachment
|
||||
deriveJSON defaultOptions ''Item
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
module Dodge.Data.Item.Tweak where
|
||||
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
import qualified IntMapHelp as IM
|
||||
|
||||
data ItemTweaks
|
||||
= NoTweaks
|
||||
| Tweakable
|
||||
{ _tweakParams :: IM.IntMap TweakParam
|
||||
}
|
||||
deriving (Eq, Show, Read) --Generic, Flat)
|
||||
|
||||
data TweakType
|
||||
= TweakPhaseV
|
||||
| TweakTractionPower
|
||||
| TweakSpinDrag
|
||||
| TweakSpinAmount
|
||||
| TweakThrustDelay
|
||||
deriving (Eq, Show, Read) --Generic, Flat)
|
||||
|
||||
data TweakParam = TweakParam
|
||||
{ _tweakType :: TweakType -- Int -> Item -> Item
|
||||
, _tweakVal :: Int
|
||||
, _tweakMax :: Int
|
||||
}
|
||||
deriving (Eq, Show, Read) --Generic, Flat)
|
||||
|
||||
makeLenses ''TweakParam
|
||||
makeLenses ''ItemTweaks
|
||||
deriveJSON defaultOptions ''TweakType
|
||||
deriveJSON defaultOptions ''TweakParam
|
||||
deriveJSON defaultOptions ''ItemTweaks
|
||||
@@ -34,19 +34,15 @@ import Geometry.Data
|
||||
import Sound.Data
|
||||
|
||||
data ItemUse
|
||||
= HeldUse
|
||||
{ -- _heldUse :: Huse
|
||||
_heldDelay :: UseDelay
|
||||
-- , _heldMods :: HeldMod
|
||||
= UseHeld
|
||||
{ _heldDelay :: UseDelay
|
||||
, _heldHammer :: HammerPosition
|
||||
, _heldAim :: AimParams
|
||||
, _heldAmmoTypes :: IM.IntMap AmmoType
|
||||
, _heldParams :: HeldParams
|
||||
, _heldTriggerType :: TriggerType
|
||||
, _heldUsageTime :: Int -- this is not yet implemented
|
||||
-- , _useTargeting :: Maybe TargetType
|
||||
}
|
||||
| LeftUse
|
||||
| UseHotkey
|
||||
{ _leftUse :: Luse
|
||||
, _leftDelay :: UseDelay
|
||||
, _leftHammer :: HammerPosition
|
||||
|
||||
Reference in New Issue
Block a user