Work on inventory management
This commit is contained in:
@@ -49,7 +49,7 @@ data Creature = Creature
|
||||
, _crHP :: Int
|
||||
, _crMaxHP :: Int
|
||||
, _crInv :: IM.IntMap Item
|
||||
, _crInvSel :: InvSel
|
||||
, _crManipulation :: Manipulation
|
||||
, _crInvCapacity :: Int
|
||||
, _crInvLock :: Bool
|
||||
, _crInvEquipped :: IM.IntMap EquipPosition
|
||||
@@ -98,7 +98,7 @@ data Intention = Intention
|
||||
--deriving (Eq, Show, Read) --Generic, Flat)
|
||||
|
||||
crSel :: Creature -> ManipulatedObject
|
||||
crSel = _isel . _crInvSel
|
||||
crSel = _isel . _crManipulation
|
||||
|
||||
makeLenses ''Creature
|
||||
makeLenses ''CreatureTargeting
|
||||
|
||||
@@ -17,9 +17,9 @@ data LoadAction
|
||||
| LoadPrime {_actionTime :: Int, _actionSound :: SoundID}
|
||||
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
|
||||
data InvSel -- should be ManipulatedObject?
|
||||
data Manipulation -- should be ManipulatedObject?
|
||||
-- = InvSel {_isel :: SelPos}
|
||||
= InvSel {_isel :: ManipulatedObject}
|
||||
= Manipulator {_isel :: ManipulatedObject}
|
||||
| Brute
|
||||
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
|
||||
@@ -42,11 +42,11 @@ data LeftInvSel = LeftInvSel
|
||||
|
||||
makeLenses ''LoadAction
|
||||
makeLenses ''ManipulatedObject
|
||||
makeLenses ''InvSel
|
||||
makeLenses ''Manipulation
|
||||
makeLenses ''LeftInvSel
|
||||
makeLenses ''InvSelAction
|
||||
deriveJSON defaultOptions ''LoadAction
|
||||
deriveJSON defaultOptions ''InvSelAction
|
||||
deriveJSON defaultOptions ''ManipulatedObject
|
||||
deriveJSON defaultOptions ''InvSel
|
||||
deriveJSON defaultOptions ''Manipulation
|
||||
deriveJSON defaultOptions ''LeftInvSel
|
||||
|
||||
Reference in New Issue
Block a user