Start move towards using assignable hotkeys for active equipment

This commit is contained in:
2023-05-03 22:37:57 +01:00
parent 487280a475
commit aeefbd4c40
5 changed files with 18 additions and 5 deletions
+3
View File
@@ -32,6 +32,7 @@ import Dodge.Data.Item
import Dodge.Data.Material
import Geometry.Data
import qualified IntMapHelp as IM
--import MaybeHelp
data Creature = Creature
@@ -56,6 +57,8 @@ data Creature = Creature
, _crInvEquipped :: IM.IntMap EquipPosition
, _crEquipment :: M.Map EquipPosition Int
, _crLeftInvSel :: LeftInvSel
, _crInvHotkeys :: IM.IntMap Hotkey
, _crHotkeys :: M.Map Hotkey Int
, _crState :: CreatureState
, _crCorpse :: CreatureCorpse --Creature -> Corpse -> SPic
, _crMaterial :: Material
+10 -1
View File
@@ -27,10 +27,19 @@ data EquipPosition
| OnSpecial
deriving (Eq, Ord)
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
data Hotkey = HotkeyQ
| HotkeyE
| Hotkey1
| Hotkey2
| Hotkey3
| Hotkey4
deriving (Eq, Show, Read, Ord, Bounded, Enum) --Generic, Flat)
deriveJSON defaultOptions ''EquipSite
deriveJSON defaultOptions ''EquipPosition
deriveJSON defaultOptions ''Hotkey
instance ToJSONKey EquipPosition
instance FromJSONKey EquipPosition
instance ToJSONKey Hotkey
instance FromJSONKey Hotkey
@@ -48,7 +48,6 @@ data InvSelAction
data LeftInvSel = LeftInvSel
{ _lisMPos :: Maybe Int
, _lisActive :: Bool
}
makeLenses ''LoadAction