Continue reload refactor

This commit is contained in:
2022-06-21 14:07:17 +01:00
parent 14a7189b44
commit 53c8be0679
33 changed files with 106 additions and 115 deletions
+6 -2
View File
@@ -346,8 +346,7 @@ data Creature = Creature
, _crHP :: Int
, _crMaxHP :: Int
, _crInv :: IM.IntMap Item
, _crInvSel :: Int
, _crInvSelAction :: InvSelAction
, _crInvSel :: InvSel
, _crInvCapacity :: Int
, _crInvLock :: Bool
, _crInvEquipped :: IM.IntMap EquipPosition
@@ -550,6 +549,7 @@ data LoadAction
| Insert {_actionTime :: Int, _insertMax :: Maybe Int }
| Prime {_actionTime :: Int}
deriving (Eq,Ord,Show)
data InvSel = InvSel {_iselPos :: Int, _iselAction :: InvSelAction }
data InvSelAction
= NoInvSelAction
| ReloadAction { _actionProgress :: Int, _reloadAction :: LoadAction }
@@ -1478,6 +1478,7 @@ makeLenses ''FloorItem
makeLenses ''ItemConsumption
makeLenses ''AmmoType
makeLenses ''LoadAction
makeLenses ''InvSel
makeLenses ''InvSelAction
makeLenses ''TweakParam
makeLenses ''Prop
@@ -1539,3 +1540,6 @@ makeLenses ''RoomType
makeLenses ''PSType
makeLenses ''PlacementSpot
makeLenses ''Placement
crSel :: Creature -> Int
crSel = _iselPos . _crInvSel