Move AmmoType, going towards no need for Aeson

This commit is contained in:
2025-06-05 13:16:57 +01:00
parent cff32e50f3
commit 7f1b790688
17 changed files with 241 additions and 242 deletions
+1
View File
@@ -5,6 +5,7 @@
module Dodge.Data.ComposedItem where
import Dodge.Data.AmmoType
import Dodge.Data.DoubleTree
import Control.Lens
import Data.Aeson
+3 -3
View File
@@ -13,7 +13,7 @@ module Dodge.Data.Item (
) where
import Geometry.Data
import qualified Data.IntMap.Strict as IM
--import qualified Data.IntMap.Strict as IM
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
@@ -34,7 +34,7 @@ data Consumables
| AmmoMag
{ _magLoadStatus :: ReloadStatus
, _magParams :: AmmoParams
, _magType :: AmmoType
-- , _magType :: AmmoType
}
deriving (Eq, Show, Read)
@@ -47,7 +47,7 @@ data Item = Item
, _itLocation :: ItemLocation
, _itEffect :: ItEffect
, _itTargeting :: ItemTargeting
, _itAmmoSlots :: IM.IntMap AmmoType
-- , _itAmmoSlots :: IM.IntMap AmmoType
, _itParams :: ItemParams
, _itScroll :: ItemScroll
, _itTimeLastUsed :: Int
+2 -12
View File
@@ -21,16 +21,6 @@ data ProjectileUpdate
| RemoteDirectionPU {_pjuStart :: Int, _pjuEnd :: Int}
deriving (Show, Eq, Ord, Read) --Generic, Flat)
data AmmoType
= LauncherAmmo
| BulletAmmo
| BeltBulletAmmo
| ElectricalAmmo
| DroneAmmo
| GasAmmo
| PrintMaterial
| ExplosivePutty
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data ForceFieldType = DefaultForceField
deriving (Eq, Ord, Show, Read) --Generic, Flat)
@@ -42,9 +32,9 @@ data GasCreate = CreatePoisonGas | CreateFlame
deriving (Eq, Ord, Show, Enum, Bounded, Read) --Generic, Flat)
makeLenses ''ProjectileUpdate
makeLenses ''AmmoType
--makeLenses ''AmmoType
deriveJSON defaultOptions ''GasFuel
deriveJSON defaultOptions ''ProjectileUpdate
deriveJSON defaultOptions ''GasCreate
deriveJSON defaultOptions ''ForceFieldType
deriveJSON defaultOptions ''AmmoType
--deriveJSON defaultOptions ''AmmoType