Go back to JSON encoding
This commit is contained in:
@@ -11,9 +11,6 @@ module Dodge.Data.Item.Use.Consumption (
|
||||
module Dodge.Data.Item.Use.Consumption.LoadAction,
|
||||
) where
|
||||
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
import Data.Binary
|
||||
import Flat
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
@@ -32,7 +29,6 @@ data HeldConsumption
|
||||
}
|
||||
| NoConsumption
|
||||
deriving (Eq, Show, Read, Generic, Flat)
|
||||
$($(derive [d| instance Deriving (Store HeldConsumption) |]))
|
||||
|
||||
data LeftConsumption
|
||||
= AutoRecharging
|
||||
@@ -46,14 +42,12 @@ data LeftConsumption
|
||||
, _wpCharge :: Int
|
||||
}
|
||||
deriving (Eq, Show, Read, Generic, Flat)
|
||||
$($(derive [d| instance Deriving (Store LeftConsumption) |]))
|
||||
|
||||
newtype ItAmount = ItAmount {_getItAmount :: Int}
|
||||
-- deriving (Eq, Ord, Read, Show, Num, Real, Generic, Flat)
|
||||
deriving newtype (Eq, Ord, Read, Show, Num, Real, Enum, Integral)
|
||||
deriving stock (Generic)
|
||||
deriving anyclass (Flat)
|
||||
$($(derive [d| instance Deriving (Store ItAmount) |]))
|
||||
|
||||
makeLenses ''HeldConsumption
|
||||
makeLenses ''LeftConsumption
|
||||
|
||||
@@ -9,9 +9,6 @@ module Dodge.Data.Item.Use.Consumption.Ammo (
|
||||
module Dodge.Data.Payload,
|
||||
) where
|
||||
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
import Data.Binary
|
||||
import Flat
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
@@ -62,7 +59,6 @@ data AmmoType
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data ForceFieldType = DefaultForceField
|
||||
| HackForceFieldType
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data GasCreate = CreatePoisonGas | CreateFlame
|
||||
@@ -76,9 +72,3 @@ deriveJSON defaultOptions ''ProjectileUpdate
|
||||
deriveJSON defaultOptions ''AmmoType
|
||||
deriveJSON defaultOptions ''GasCreate
|
||||
deriveJSON defaultOptions ''ForceFieldType
|
||||
$($(derive [d| instance Deriving (Store AmmoType) |]))
|
||||
$($(derive [d| instance Deriving (Store ProjectileDraw ) |]))
|
||||
$($(derive [d| instance Deriving (Store ProjectileCreate ) |]))
|
||||
$($(derive [d| instance Deriving (Store ProjectileUpdate) |]))
|
||||
$($(derive [d| instance Deriving (Store ForceFieldType ) |]))
|
||||
$($(derive [d| instance Deriving (Store GasCreate ) |]))
|
||||
|
||||
@@ -5,9 +5,6 @@
|
||||
|
||||
module Dodge.Data.Item.Use.Consumption.LoadAction where
|
||||
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
import Data.Binary
|
||||
import Flat
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
@@ -36,6 +33,3 @@ makeLenses ''InvSelAction
|
||||
deriveJSON defaultOptions ''LoadAction
|
||||
deriveJSON defaultOptions ''InvSel
|
||||
deriveJSON defaultOptions ''InvSelAction
|
||||
$($(derive [d| instance Deriving (Store LoadAction) |]))
|
||||
$($(derive [d| instance Deriving (Store InvSelAction) |]))
|
||||
$($(derive [d| instance Deriving (Store InvSel ) |]))
|
||||
|
||||
@@ -8,9 +8,6 @@ module Dodge.Data.Item.Use.Equipment (
|
||||
module Dodge.Data.Item.Use.Equipment,
|
||||
) where
|
||||
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
import Data.Binary
|
||||
import Flat
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
@@ -38,5 +35,3 @@ 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