Partially working change to selected items
This commit is contained in:
@@ -97,8 +97,8 @@ data Intention = Intention
|
||||
|
||||
--deriving (Eq, Show, Read) --Generic, Flat)
|
||||
|
||||
crSel :: Creature -> Int
|
||||
crSel = _iselPos . _crInvSel
|
||||
crSel :: Creature -> ManipulatedObject
|
||||
crSel = _isel . _crInvSel
|
||||
|
||||
makeLenses ''Creature
|
||||
makeLenses ''CreatureTargeting
|
||||
|
||||
@@ -18,14 +18,16 @@ data LoadAction
|
||||
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
|
||||
data InvSel -- should be ManipulatedObject?
|
||||
= InvSel {_iselPos :: Int, _iselAction :: InvSelAction}
|
||||
-- = InvSel {_isel :: SelPos}
|
||||
= InvSel {_isel :: ManipulatedObject}
|
||||
| Brute
|
||||
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
|
||||
data SelPos
|
||||
= SelItem Int
|
||||
data ManipulatedObject
|
||||
= SelItem { _ispItem :: Int
|
||||
, _iselAction :: InvSelAction}
|
||||
| SelNothing
|
||||
| SelCloseObject Int
|
||||
| SelCloseObject {_ispCloseObject :: Int}
|
||||
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
|
||||
data InvSelAction
|
||||
@@ -39,10 +41,12 @@ data LeftInvSel = LeftInvSel
|
||||
}
|
||||
|
||||
makeLenses ''LoadAction
|
||||
makeLenses ''ManipulatedObject
|
||||
makeLenses ''InvSel
|
||||
makeLenses ''LeftInvSel
|
||||
makeLenses ''InvSelAction
|
||||
deriveJSON defaultOptions ''LoadAction
|
||||
deriveJSON defaultOptions ''InvSelAction
|
||||
deriveJSON defaultOptions ''ManipulatedObject
|
||||
deriveJSON defaultOptions ''InvSel
|
||||
deriveJSON defaultOptions ''LeftInvSel
|
||||
|
||||
Reference in New Issue
Block a user