Partially working change to selected items

This commit is contained in:
2023-02-07 12:07:13 +00:00
parent 5f7d662454
commit c354949ca9
27 changed files with 386 additions and 288 deletions
+2 -2
View File
@@ -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