Remove generic and flat instances

This commit is contained in:
2022-08-21 22:38:40 +01:00
parent 36c8befa9f
commit 7181046aa3
94 changed files with 312 additions and 423 deletions
+5 -6
View File
@@ -11,7 +11,6 @@ module Dodge.Data.Item.Use.Consumption (
module Dodge.Data.Item.Use.Consumption.LoadAction,
) where
import Flat
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
@@ -28,7 +27,7 @@ data HeldConsumption
, _laProgress :: Maybe [LoadAction]
}
| NoConsumption
deriving (Eq, Show, Read, Generic, Flat)
deriving (Eq, Show, Read) --Generic, Flat)
data LeftConsumption
= AutoRecharging
@@ -41,13 +40,13 @@ data LeftConsumption
{ _wpMaxCharge :: Int
, _wpCharge :: Int
}
deriving (Eq, Show, Read, Generic, Flat)
deriving (Eq, Show, Read) --Generic, Flat)
newtype ItAmount = ItAmount {_getItAmount :: Int}
-- deriving (Eq, Ord, Read, Show, Num, Real, Generic, Flat)
-- 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)
-- deriving stock (Generic)
-- deriving anyclass (Flat)
makeLenses ''HeldConsumption
makeLenses ''LeftConsumption
+6 -7
View File
@@ -9,7 +9,6 @@ module Dodge.Data.Item.Use.Consumption.Ammo (
module Dodge.Data.Payload,
) where
import Flat
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
@@ -17,10 +16,10 @@ import Dodge.Data.Bullet
import Dodge.Data.Payload
data ProjectileDraw = DrawShell | DrawRemoteShell | DrawDrone | DrawBlankProjectile
deriving (Show, Read, Eq, Ord, Enum, Bounded, Generic, Flat)
deriving (Show, Eq, Ord, Enum, Bounded, Read) --Generic, Flat)
data ProjectileCreate = CreateShell | CreateTrackingShell
deriving (Show, Read, Eq, Ord, Enum, Bounded, Generic, Flat)
deriving (Show, Eq, Ord, Enum, Bounded, Read) --Generic, Flat)
data ProjectileUpdate
= PJThrust {_pjuStart :: Int, _pjuEnd :: Int}
@@ -33,7 +32,7 @@ data ProjectileUpdate
| PJDecTimMvVel
| PJShellCollisionCheck
| PJRemoteShellCollisionCheck
deriving (Show, Read, Eq, Ord, Generic, Flat)
deriving (Show, Eq, Ord, Read) --Generic, Flat)
data AmmoType
= ProjectileAmmo
@@ -56,13 +55,13 @@ data AmmoType
{ _amForceFieldType :: ForceFieldType
}
| GenericAmmo
deriving (Eq, Ord, Show, Read, Generic, Flat)
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data ForceFieldType = DefaultForceField
deriving (Eq, Ord, Show, Read, Generic, Flat)
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data GasCreate = CreatePoisonGas | CreateFlame
deriving (Eq, Ord, Show, Enum, Bounded, Read, Generic, Flat)
deriving (Eq, Ord, Show, Enum, Bounded, Read) --Generic, Flat)
makeLenses ''ProjectileUpdate
makeLenses ''AmmoType
@@ -5,7 +5,6 @@
module Dodge.Data.Item.Use.Consumption.LoadAction where
import Flat
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
@@ -17,15 +16,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, Generic, Flat)
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data InvSel = InvSel {_iselPos :: Int, _iselAction :: InvSelAction}
deriving (Eq, Ord, Show, Read, Generic, Flat)
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data InvSelAction
= NoInvSelAction
| ReloadAction {_actionProgress :: Int, _reloadAction :: LoadAction, _actionHammer :: HammerType}
deriving (Eq, Ord, Show, Read, Generic, Flat)
deriving (Eq, Ord, Show, Read) --Generic, Flat)
makeLenses ''LoadAction
makeLenses ''InvSel
+2 -3
View File
@@ -8,7 +8,6 @@ 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
@@ -23,13 +22,13 @@ data EquipEffect = EquipEffect
, _eeParams :: EquipParams
, _eeViewDist :: Maybe Float
}
deriving (Eq, Ord, Show, Read, Generic, Flat)
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data EquipParams
= NoEquipParams
| EquipID {_eparamID :: Int}
| EquipCounter {_eparamInt :: Int}
deriving (Eq, Ord, Show, Read, Generic, Flat)
deriving (Eq, Ord, Show, Read) --Generic, Flat)
makeLenses ''EquipEffect
makeLenses ''EquipParams