Start to implement equipment sites on body

This commit is contained in:
2022-05-21 12:13:50 +01:00
parent bc0f7ada3c
commit 398ed6d982
8 changed files with 94 additions and 23 deletions
+19
View File
@@ -278,6 +278,7 @@ data Creature = Creature
, _crInvCapacity :: Int
, _crInvLock :: Bool
, _crInvEquipped :: IS.IntSet
, _crEquipment :: CreatureEquipment
, _crLeftInvSel :: Maybe Int
, _crState :: CreatureState
, _crCorpse :: Picture
@@ -296,6 +297,14 @@ data Creature = Creature
, _crHammerPosition :: HammerPosition
, _crName :: String
}
data CreatureEquipment = CreatureEquipment
{_onHead :: Maybe' Int
,_onChest :: Maybe' Int
,_onBack :: Maybe' Int
,_onWristL :: Maybe' Int
,_onWristR :: Maybe' Int
,_onLegs :: Maybe' Int
}
data Vocalization
= Mute
| Vocalization
@@ -376,8 +385,17 @@ data ItemUse
}
| EquipUse
{ _eqUse :: Creature -> Int -> World -> World
, _eqSite :: EquipSite
}
| NoUse
data EquipSite
= GoesOnHead
| GoesOnChest
| GoesOnBack
| GoesOnWrist
| GoesOnLegs
| GoesOnSpecial
deriving (Eq,Ord,Show)
_itUseAimStance :: Item -> AimStance
_itUseAimStance = _aimStance . _useAim . _itUse
data ItemConsumption
@@ -1288,3 +1306,4 @@ makeLenses ''Beam
makeLenses ''BeamType
makeLenses ''WorldBeams
makeLenses ''ArcStep
makeLenses ''CreatureEquipment