Remove consumable records

This commit is contained in:
2025-06-05 21:15:20 +01:00
parent 816ab4222f
commit 10ca82c4d5
16 changed files with 258 additions and 321 deletions
+1 -5
View File
@@ -33,21 +33,17 @@ data Consumables
= NoConsumables
| AmmoMag
{ _magLoadStatus :: ReloadStatus
, _magParams :: AmmoParams
-- , _magType :: AmmoType
}
deriving (Eq, Show, Read)
data Item = Item
{ _itUse :: ItemUse
-- , _itUseCondition :: UseCondition
, _itConsumables :: Consumables
, _itConsumables :: Maybe Int
, _itType :: ItemType
, _itID :: NewInt ItmInt
, _itLocation :: ItemLocation
, _itEffect :: ItEffect
, _itTargeting :: ItemTargeting
-- , _itAmmoSlots :: IM.IntMap AmmoType
, _itParams :: ItemParams
, _itScroll :: ItemScroll
, _itTimeLastUsed :: Int
+2 -10
View File
@@ -39,11 +39,6 @@ data ItemUse
}
deriving (Eq, Show, Read)
data UseFocus
= UseFromRoot
| UseFromLocation
deriving (Eq, Show, Read)
data AttachParams
= APProjectiles {_apProjectiles :: [Int]}
| APInt {_apInt :: Int}
@@ -60,10 +55,7 @@ data AmmoParams
makeLenses ''ItemUse
makeLenses ''AttachParams
makeLenses ''AmmoParams
--makeLenses ''UseCondition
makeLenses ''UseFocus
--deriveJSON defaultOptions ''UseFocus
--deriveJSON defaultOptions ''UseCondition
deriveJSON defaultOptions ''AmmoParams
--makeLenses ''UseFocus
--deriveJSON defaultOptions ''AmmoParams
deriveJSON defaultOptions ''AttachParams
deriveJSON defaultOptions ''ItemUse
+1 -2
View File
@@ -18,8 +18,7 @@ import Dodge.Data.Item.Use.Consumption.Ammo
import Dodge.Data.Item.Use.Consumption.LoadAction
data ReloadStatus = ReloadStatus
{ _iaMax :: Int
, _iaLoaded :: Int
{ _iaLoaded :: Int
}
deriving (Eq, Show, Read) --Generic, Flat)
+5 -3
View File
@@ -1,6 +1,5 @@
{-# LANGUAGE StrictData #-}
module Dodge.Data.UseCondition
where
module Dodge.Data.UseCondition where
data UseCondition
= UseableWhenAimed
@@ -9,4 +8,7 @@ data UseCondition
| NeverUsable
deriving (Eq, Show, Read)
data UseFocus
= UseFromRoot
| UseFromLocation
deriving (Eq, Show, Read)