Move from store to flat
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
module Dodge.Data.Item.Combine where
|
||||
|
||||
import Flat
|
||||
import Control.Lens
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
@@ -17,10 +20,10 @@ data ItemType = ItemType
|
||||
, _iyModules :: M.Map ModuleSlot ItemModuleType
|
||||
, _iyStack :: Stack
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data Stack = NoStack | Stack ItAmount
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data CraftType
|
||||
= PIPE
|
||||
@@ -69,7 +72,7 @@ data CraftType
|
||||
| TIMEMODULE
|
||||
| SIZEMODULE
|
||||
| GRAVITYMODULE
|
||||
deriving (Eq, Ord, Show, Enum, Read)
|
||||
deriving (Eq, Ord, Show, Enum, Read, Generic, Flat)
|
||||
|
||||
data ItemBaseType
|
||||
= NoItemType
|
||||
@@ -78,12 +81,12 @@ data ItemBaseType
|
||||
| EQUIP {_ibtEquip :: EquipItemType}
|
||||
| Consumable {_ibtConsumable :: ConsumableItemType}
|
||||
| CRAFT CraftType
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data ConsumableItemType
|
||||
= MEDKIT Int
|
||||
| EXPLOSIVES
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data EquipItemType
|
||||
= MAGSHIELD
|
||||
@@ -99,7 +102,7 @@ data EquipItemType
|
||||
| JUMPLEGS
|
||||
| JETPACK
|
||||
| AUTODETECTOR Detector
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data LeftItemType
|
||||
= BOOSTER
|
||||
@@ -108,7 +111,7 @@ data LeftItemType
|
||||
| BLINKERUNSAFE
|
||||
| SHRINKER
|
||||
| SPAWNER
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data HeldItemType
|
||||
= BANGSTICK {_xNum :: Int}
|
||||
@@ -156,7 +159,7 @@ data HeldItemType
|
||||
| TORCH
|
||||
| FLATSHIELD
|
||||
| KEYCARD Int
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data ItemModuleType
|
||||
= EMPTYMODULE
|
||||
@@ -181,13 +184,13 @@ data ItemModuleType
|
||||
| LAUNCHHOME
|
||||
| EXTRABATTERY
|
||||
| ATTACHTORCH
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data Detector
|
||||
= ITEMDETECTOR
|
||||
| CREATUREDETECTOR
|
||||
| WALLDETECTOR
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data ModuleSlot
|
||||
= ModBullet
|
||||
@@ -201,7 +204,7 @@ data ModuleSlot
|
||||
| ModTeleport
|
||||
| ModDualBeam
|
||||
| ModHeldAttach
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
instance ToJSONKey ModuleSlot
|
||||
|
||||
@@ -221,14 +224,3 @@ deriveJSON defaultOptions ''ModuleSlot
|
||||
makeLenses ''ItemType
|
||||
makeLenses ''ItemBaseType
|
||||
makeLenses ''HeldItemType
|
||||
$($(derive [d| instance Deriving (Store ItemType) |]))
|
||||
$($(derive [d| instance Deriving (Store Stack) |]))
|
||||
$($(derive [d| instance Deriving (Store CraftType) |]))
|
||||
$($(derive [d| instance Deriving (Store ItemBaseType) |]))
|
||||
$($(derive [d| instance Deriving (Store ConsumableItemType) |]))
|
||||
$($(derive [d| instance Deriving (Store EquipItemType) |]))
|
||||
$($(derive [d| instance Deriving (Store LeftItemType) |]))
|
||||
$($(derive [d| instance Deriving (Store HeldItemType) |]))
|
||||
$($(derive [d| instance Deriving (Store ItemModuleType) |]))
|
||||
$($(derive [d| instance Deriving (Store Detector) |]))
|
||||
$($(derive [d| instance Deriving (Store ModuleSlot) |]))
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
module Dodge.Data.Item.CurseStatus where
|
||||
|
||||
import Flat
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
import TH.Derive
|
||||
@@ -12,7 +15,6 @@ data CurseStatus
|
||||
= Uncursed
|
||||
| UndroppableIdentified
|
||||
| UndroppableUnidentified
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
deriveJSON defaultOptions ''CurseStatus
|
||||
$($(derive [d| instance Deriving (Store CurseStatus) |]))
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
module Dodge.Data.Item.Effect where
|
||||
|
||||
import Flat
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
@@ -16,7 +19,7 @@ data ItEffect = ItEffect
|
||||
, _ieOnHeld :: ItInvEffect
|
||||
, _ieOnStash :: ItInvEffect
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data ItInvEffect
|
||||
= NoInvEffect
|
||||
@@ -26,22 +29,18 @@ data ItInvEffect
|
||||
| CreateShieldWall
|
||||
| RemoveShieldWall
|
||||
| EffectWhileHeld ItInvEffect
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data ItFloorEffect = NoFloorEffect
|
||||
| DefaultFloorEffect
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data ItDropEffect = NoDropEffect
|
||||
| DefaultDropEffect
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
makeLenses ''ItEffect
|
||||
deriveJSON defaultOptions ''ItEffect
|
||||
deriveJSON defaultOptions ''ItInvEffect
|
||||
deriveJSON defaultOptions ''ItFloorEffect
|
||||
deriveJSON defaultOptions ''ItDropEffect
|
||||
$($(derive [d| instance Deriving (Store ItEffect) |]))
|
||||
$($(derive [d| instance Deriving (Store ItInvEffect) |]))
|
||||
$($(derive [d| instance Deriving (Store ItFloorEffect) |]))
|
||||
$($(derive [d| instance Deriving (Store ItDropEffect) |]))
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
module Dodge.Data.Item.HeldDelay where
|
||||
|
||||
import Flat
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
@@ -25,8 +28,7 @@ data UseDelay -- should just be Delay
|
||||
{ _warmTime :: Int
|
||||
, _warmMax :: Int
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
makeLenses ''UseDelay
|
||||
deriveJSON defaultOptions ''UseDelay
|
||||
$($(derive [d| instance Deriving (Store UseDelay) |]))
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
module Dodge.Data.Item.HeldScroll where
|
||||
|
||||
import Flat
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
@@ -19,8 +22,7 @@ data HeldScroll
|
||||
{ _hsInt :: Int
|
||||
, _hsMaxInt :: Int
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
makeLenses ''HeldScroll
|
||||
deriveJSON defaultOptions ''HeldScroll
|
||||
$($(derive [d| instance Deriving (Store HeldScroll) |]))
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
module Dodge.Data.Item.HeldUse where
|
||||
|
||||
import Flat
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
import Dodge.Data.CamouflageStatus
|
||||
@@ -26,12 +29,12 @@ data HeldUse
|
||||
| HeldTractor
|
||||
| HeldForceField
|
||||
| HeldShatter
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data Cuse
|
||||
= CDoNothing
|
||||
| CHeal Int
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data Euse
|
||||
= EDoNothing
|
||||
@@ -42,7 +45,7 @@ data Euse
|
||||
| ECamouflage CamouflageStatus
|
||||
| EonWristShield
|
||||
| EoffWristShield
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data Luse
|
||||
= LDoNothing
|
||||
@@ -51,7 +54,7 @@ data Luse
|
||||
| LBlink
|
||||
| LUnsafeBlink
|
||||
| LBoost
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data HeldMod
|
||||
= HeldModNothing
|
||||
@@ -89,15 +92,10 @@ data HeldMod
|
||||
| RevolverXMod
|
||||
| RevolverXRepeatMod
|
||||
| BangConeMod
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
deriveJSON defaultOptions ''Cuse
|
||||
deriveJSON defaultOptions ''HeldMod
|
||||
deriveJSON defaultOptions ''Euse
|
||||
deriveJSON defaultOptions ''HeldUse
|
||||
deriveJSON defaultOptions ''Luse
|
||||
$($(derive [d| instance Deriving (Store Cuse) |]))
|
||||
$($(derive [d| instance Deriving (Store HeldMod) |]))
|
||||
$($(derive [d| instance Deriving (Store Euse) |]))
|
||||
$($(derive [d| instance Deriving (Store HeldUse) |]))
|
||||
$($(derive [d| instance Deriving (Store Luse) |]))
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
module Dodge.Data.Item.Location where
|
||||
|
||||
import Flat
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
@@ -13,8 +16,7 @@ data ItemLocation
|
||||
| OnTurret {_ipTuID :: Int}
|
||||
| OnFloor {_ipFlID :: Int}
|
||||
| InVoid
|
||||
deriving (Eq, Show, Read, Ord)
|
||||
deriving (Eq, Show, Read, Ord, Generic, Flat)
|
||||
|
||||
makeLenses ''ItemLocation
|
||||
deriveJSON defaultOptions ''ItemLocation
|
||||
$($(derive [d| instance Deriving (Store ItemLocation) |]))
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
module Dodge.Data.Item.Misc where
|
||||
|
||||
import Flat
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
@@ -16,7 +19,7 @@ data ItemDimension = ItemDimension
|
||||
, _dimCenter :: Point3
|
||||
, _dimAttachPos :: Point3
|
||||
}
|
||||
deriving (Eq, Show, Read)
|
||||
deriving (Eq, Show, Read, Generic, Flat)
|
||||
|
||||
data ItemPortage
|
||||
= HeldItem
|
||||
@@ -25,16 +28,16 @@ data ItemPortage
|
||||
}
|
||||
| WornItem
|
||||
| NoPortage
|
||||
deriving (Eq, Show, Read)
|
||||
deriving (Eq, Show, Read, Generic, Flat)
|
||||
|
||||
data ItemValue = ItemValue
|
||||
{ _ivInt :: Int
|
||||
, _ivType :: ItemValueType
|
||||
}
|
||||
deriving (Eq, Show, Read)
|
||||
deriving (Eq, Show, Read, Generic, Flat)
|
||||
|
||||
data ItemValueType = MundaneItem | ArtefactItem
|
||||
deriving (Eq, Show, Read)
|
||||
deriving (Eq, Show, Read, Generic, Flat)
|
||||
|
||||
makeLenses ''ItemDimension
|
||||
makeLenses ''ItemPortage
|
||||
@@ -43,7 +46,3 @@ deriveJSON defaultOptions ''ItemDimension
|
||||
deriveJSON defaultOptions ''ItemPortage
|
||||
deriveJSON defaultOptions ''ItemValue
|
||||
deriveJSON defaultOptions ''ItemValueType
|
||||
$($(derive [d| instance Deriving (Store ItemDimension) |]))
|
||||
$($(derive [d| instance Deriving (Store ItemPortage) |]))
|
||||
$($(derive [d| instance Deriving (Store ItemValue) |]))
|
||||
$($(derive [d| instance Deriving (Store ItemValueType) |]))
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
module Dodge.Data.Item.Params where
|
||||
|
||||
import Flat
|
||||
import Color
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
@@ -68,13 +71,13 @@ data ItemParams
|
||||
}
|
||||
| ParamMID {_paramMID :: Maybe Int}
|
||||
| BoostPropIX {_boostPropIX :: Maybe Int}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data ShrinkGunStatus = FullSize | Shrunk
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data PreviousArcEffect = NoPreviousArcEffect | PerturbTillBreakPreviousArc
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data GunBarrels
|
||||
= MultiBarrel
|
||||
@@ -87,7 +90,7 @@ data GunBarrels
|
||||
, _brlInaccuracy :: Float
|
||||
}
|
||||
| SingleBarrel {_brlInaccuracy :: Float}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data Nozzle = Nozzle
|
||||
{ _nzPressure :: Float
|
||||
@@ -97,13 +100,13 @@ data Nozzle = Nozzle
|
||||
, _nzWalkSpeed :: Float
|
||||
, _nzLength :: Float
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data BarrelSpread
|
||||
= AlignedBarrels
|
||||
| SpreadBarrels {_spreadAngle :: Float}
|
||||
| RotatingBarrels {_rotatingBarrelInaccuracy :: Float}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
makeLenses ''BarrelSpread
|
||||
makeLenses ''ItemParams
|
||||
@@ -115,9 +118,3 @@ deriveJSON defaultOptions ''PreviousArcEffect
|
||||
deriveJSON defaultOptions ''GunBarrels
|
||||
deriveJSON defaultOptions ''Nozzle
|
||||
deriveJSON defaultOptions ''BarrelSpread
|
||||
$($(derive [d| instance Deriving (Store ItemParams) |]))
|
||||
$($(derive [d| instance Deriving (Store ShrinkGunStatus) |]))
|
||||
$($(derive [d| instance Deriving (Store PreviousArcEffect) |]))
|
||||
$($(derive [d| instance Deriving (Store GunBarrels) |]))
|
||||
$($(derive [d| instance Deriving (Store Nozzle) |]))
|
||||
$($(derive [d| instance Deriving (Store BarrelSpread) |]))
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
module Dodge.Data.Item.Scope where
|
||||
|
||||
import Flat
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
@@ -29,8 +32,7 @@ data Scope
|
||||
, -- | if the camera offset is also the center of vision
|
||||
_scopeIsCamera :: Bool
|
||||
}
|
||||
deriving (Eq, Show, Read)
|
||||
deriving (Eq, Show, Read, Generic, Flat)
|
||||
|
||||
makeLenses ''Scope
|
||||
deriveJSON defaultOptions ''Scope
|
||||
$($(derive [d| instance Deriving (Store Scope) |]))
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
module Dodge.Data.Item.Targeting where
|
||||
|
||||
import Flat
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
@@ -20,7 +23,7 @@ data Targeting
|
||||
, _tgID :: Maybe Int
|
||||
, _tgActive :: Bool
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data TargetUpdate
|
||||
= NoTargetUpdate
|
||||
@@ -28,19 +31,16 @@ data TargetUpdate
|
||||
| TargetRBPressUpdate
|
||||
| TargetRBCreatureUpdate
|
||||
| TargetCursorUpdate
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data TargetDraw
|
||||
= NoTargetDraw
|
||||
| TargetDistanceDraw
|
||||
| SimpleDrawTarget
|
||||
| TargetRBCreatureDraw
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
makeLenses ''Targeting
|
||||
deriveJSON defaultOptions ''Targeting
|
||||
deriveJSON defaultOptions ''TargetUpdate
|
||||
deriveJSON defaultOptions ''TargetDraw
|
||||
$($(derive [d| instance Deriving (Store Targeting) |]))
|
||||
$($(derive [d| instance Deriving (Store TargetUpdate) |]))
|
||||
$($(derive [d| instance Deriving (Store TargetDraw) |]))
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
module Dodge.Data.Item.Tweak where
|
||||
|
||||
import Flat
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
@@ -15,7 +18,7 @@ data ItemTweaks
|
||||
| Tweakable
|
||||
{ _tweakParams :: IM.IntMap TweakParam
|
||||
}
|
||||
deriving (Eq, Show, Read)
|
||||
deriving (Eq, Show, Read, Generic, Flat)
|
||||
|
||||
data TweakType
|
||||
= TweakPhaseV
|
||||
@@ -23,20 +26,17 @@ data TweakType
|
||||
| TweakSpinDrag
|
||||
| TweakSpinAmount
|
||||
| TweakThrustDelay
|
||||
deriving (Eq, Show, Read)
|
||||
deriving (Eq, Show, Read, Generic, Flat)
|
||||
|
||||
data TweakParam = TweakParam
|
||||
{ _tweakType :: TweakType -- Int -> Item -> Item
|
||||
, _tweakVal :: Int
|
||||
, _tweakMax :: Int
|
||||
}
|
||||
deriving (Eq, Show, Read)
|
||||
deriving (Eq, Show, Read, Generic, Flat)
|
||||
|
||||
makeLenses ''TweakParam
|
||||
makeLenses ''ItemTweaks
|
||||
deriveJSON defaultOptions ''ItemTweaks
|
||||
deriveJSON defaultOptions ''TweakType
|
||||
deriveJSON defaultOptions ''TweakParam
|
||||
$($(derive [d| instance Deriving (Store ItemTweaks) |]))
|
||||
$($(derive [d| instance Deriving (Store TweakType) |]))
|
||||
$($(derive [d| instance Deriving (Store TweakParam) |]))
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
@@ -11,6 +13,7 @@ module Dodge.Data.Item.Use (
|
||||
module Dodge.Data.Hammer,
|
||||
) where
|
||||
|
||||
import Flat
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
@@ -49,7 +52,7 @@ data ItemUse
|
||||
}
|
||||
| CraftUse
|
||||
{_useAmount :: ItAmount}
|
||||
deriving (Eq, Show, Read)
|
||||
deriving (Eq, Show, Read, Generic, Flat)
|
||||
|
||||
data AimParams = AimParams
|
||||
{ _aimWeight :: Int
|
||||
@@ -59,21 +62,21 @@ data AimParams = AimParams
|
||||
, _aimHandlePos :: Float
|
||||
, _aimMuzPos :: Float
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data AimStance
|
||||
= TwoHandTwist
|
||||
| TwoHandFlat
|
||||
| OneHand
|
||||
| LeaveHolstered
|
||||
deriving (Eq, Show, Ord, Enum, Read)
|
||||
deriving (Eq, Show, Ord, Enum, Read, Generic, Flat)
|
||||
|
||||
data ItZoom = ItZoom
|
||||
{ _itZoomMax :: Float
|
||||
, _itZoomMin :: Float
|
||||
, _itZoomFac :: Float
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
makeLenses ''ItemUse
|
||||
makeLenses ''AimParams
|
||||
@@ -82,8 +85,3 @@ deriveJSON defaultOptions ''ItemUse
|
||||
deriveJSON defaultOptions ''AimParams
|
||||
deriveJSON defaultOptions ''AimStance
|
||||
deriveJSON defaultOptions ''ItZoom
|
||||
|
||||
$($(derive [d| instance Deriving (Store ItemUse) |]))
|
||||
$($(derive [d| instance Deriving (Store AimParams) |]))
|
||||
$($(derive [d| instance Deriving (Store AimStance) |]))
|
||||
$($(derive [d| instance Deriving (Store ItZoom) |]))
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
@@ -8,6 +10,7 @@ module Dodge.Data.Item.Use.Consumption (
|
||||
module Dodge.Data.Item.Use.Consumption.LoadAction,
|
||||
) where
|
||||
|
||||
import Flat
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
import Control.Lens
|
||||
@@ -26,7 +29,7 @@ data HeldConsumption
|
||||
, _laProgress :: Maybe [LoadAction]
|
||||
}
|
||||
| NoConsumption
|
||||
deriving (Eq, Show, Read)
|
||||
deriving (Eq, Show, Read, Generic, Flat)
|
||||
|
||||
data LeftConsumption
|
||||
= AutoRecharging
|
||||
@@ -39,10 +42,10 @@ data LeftConsumption
|
||||
{ _wpMaxCharge :: Int
|
||||
, _wpCharge :: Int
|
||||
}
|
||||
deriving (Eq, Show, Read)
|
||||
deriving (Eq, Show, Read, Generic, Flat)
|
||||
|
||||
newtype ItAmount = ItAmount {_getItAmount :: Int}
|
||||
deriving (Eq, Ord, Read, Show, Num, Real, Enum, Integral)
|
||||
deriving (Eq, Ord, Read, Show, Num, Real, Enum, Integral, Generic, Flat)
|
||||
|
||||
makeLenses ''HeldConsumption
|
||||
makeLenses ''LeftConsumption
|
||||
@@ -50,6 +53,3 @@ makeLenses ''ItAmount
|
||||
deriveJSON defaultOptions ''HeldConsumption
|
||||
deriveJSON defaultOptions ''LeftConsumption
|
||||
deriveJSON defaultOptions ''ItAmount
|
||||
$($(derive [d| instance Deriving (Store HeldConsumption) |]))
|
||||
$($(derive [d| instance Deriving (Store LeftConsumption) |]))
|
||||
$($(derive [d| instance Deriving (Store ItAmount) |]))
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
@@ -7,6 +9,7 @@ module Dodge.Data.Item.Use.Consumption.Ammo (
|
||||
module Dodge.Data.Payload,
|
||||
) where
|
||||
|
||||
import Flat
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
import Control.Lens
|
||||
@@ -16,10 +19,10 @@ import Dodge.Data.Bullet
|
||||
import Dodge.Data.Payload
|
||||
|
||||
data ProjectileDraw = DrawShell | DrawRemoteShell | DrawDrone | DrawBlankProjectile
|
||||
deriving (Show, Read, Eq, Ord, Enum, Bounded)
|
||||
deriving (Show, Read, Eq, Ord, Enum, Bounded, Generic, Flat)
|
||||
|
||||
data ProjectileCreate = CreateShell | CreateTrackingShell
|
||||
deriving (Show, Read, Eq, Ord, Enum, Bounded)
|
||||
deriving (Show, Read, Eq, Ord, Enum, Bounded, Generic, Flat)
|
||||
|
||||
data ProjectileUpdate
|
||||
= PJThrust {_pjuStart :: Int, _pjuEnd :: Int}
|
||||
@@ -32,7 +35,7 @@ data ProjectileUpdate
|
||||
| PJDecTimMvVel
|
||||
| PJShellCollisionCheck
|
||||
| PJRemoteShellCollisionCheck
|
||||
deriving (Show, Read, Eq, Ord)
|
||||
deriving (Show, Read, Eq, Ord, Generic, Flat)
|
||||
|
||||
data AmmoType
|
||||
= ProjectileAmmo
|
||||
@@ -55,14 +58,13 @@ data AmmoType
|
||||
{ _amForceFieldType :: ForceFieldType
|
||||
}
|
||||
| GenericAmmo
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data ForceFieldType = DefaultForceField
|
||||
| HackForTemplateForceField
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data GasCreate = CreatePoisonGas | CreateFlame
|
||||
deriving (Eq, Ord, Show, Enum, Bounded, Read)
|
||||
deriving (Eq, Ord, Show, Enum, Bounded, Read, Generic, Flat)
|
||||
|
||||
makeLenses ''ProjectileUpdate
|
||||
makeLenses ''AmmoType
|
||||
@@ -72,9 +74,3 @@ deriveJSON defaultOptions ''ProjectileUpdate
|
||||
deriveJSON defaultOptions ''AmmoType
|
||||
deriveJSON defaultOptions ''GasCreate
|
||||
deriveJSON defaultOptions ''ForceFieldType
|
||||
$($(derive [d| instance Deriving (Store ProjectileDraw) |]))
|
||||
$($(derive [d| instance Deriving (Store ProjectileCreate) |]))
|
||||
$($(derive [d| instance Deriving (Store ProjectileUpdate) |]))
|
||||
$($(derive [d| instance Deriving (Store AmmoType) |]))
|
||||
$($(derive [d| instance Deriving (Store GasCreate) |]))
|
||||
$($(derive [d| instance Deriving (Store ForceFieldType) |]))
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
module Dodge.Data.Item.Use.Consumption.LoadAction where
|
||||
|
||||
import Flat
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
@@ -16,15 +19,15 @@ data LoadAction
|
||||
| LoadInsert {_actionTime :: Int, _actionSound :: SoundID}
|
||||
| LoadAdd {_actionTime :: Int, _actionSound :: SoundID, _insertMax :: Int}
|
||||
| LoadPrime {_actionTime :: Int, _actionSound :: SoundID}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data InvSel = InvSel {_iselPos :: Int, _iselAction :: InvSelAction}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data InvSelAction
|
||||
= NoInvSelAction
|
||||
| ReloadAction {_actionProgress :: Int, _reloadAction :: LoadAction, _actionHammer :: HammerType}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
makeLenses ''LoadAction
|
||||
makeLenses ''InvSel
|
||||
@@ -32,6 +35,3 @@ makeLenses ''InvSelAction
|
||||
deriveJSON defaultOptions ''LoadAction
|
||||
deriveJSON defaultOptions ''InvSel
|
||||
deriveJSON defaultOptions ''InvSelAction
|
||||
$($(derive [d| instance Deriving (Store LoadAction) |]))
|
||||
$($(derive [d| instance Deriving (Store InvSel) |]))
|
||||
$($(derive [d| instance Deriving (Store InvSelAction) |]))
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
@@ -6,6 +8,7 @@ module Dodge.Data.Item.Use.Equipment (
|
||||
module Dodge.Data.Item.Use.Equipment,
|
||||
) where
|
||||
|
||||
import Flat
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
@@ -22,17 +25,15 @@ data EquipEffect = EquipEffect
|
||||
, _eeParams :: EquipParams
|
||||
, _eeViewDist :: Maybe Float
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data EquipParams
|
||||
= NoEquipParams
|
||||
| EquipID {_eparamID :: Int}
|
||||
| EquipCounter {_eparamInt :: Int}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
makeLenses ''EquipEffect
|
||||
makeLenses ''EquipParams
|
||||
deriveJSON defaultOptions ''EquipEffect
|
||||
deriveJSON defaultOptions ''EquipParams
|
||||
$($(derive [d| instance Deriving (Store EquipEffect) |]))
|
||||
$($(derive [d| instance Deriving (Store EquipParams) |]))
|
||||
|
||||
Reference in New Issue
Block a user