Move toward adding multiple equipable items that are not directly usable

This commit is contained in:
2021-12-08 17:09:24 +00:00
parent 9f6e5af991
commit a9139db0a8
22 changed files with 260 additions and 137 deletions
+12
View File
@@ -82,6 +82,7 @@ data World = World
, _walls :: !(IM.IntMap Wall)
, _doors :: IM.IntMap Door
, _machines :: IM.IntMap Machine
, _magnets :: IM.IntMap Magnet
, _blocks :: IM.IntMap Block
, _coordinates :: IM.IntMap Point2
, _triggers :: IM.IntMap (World -> Bool)
@@ -130,6 +131,13 @@ data WorldTerminal = WorldTerminal Int [(Int,String)]
data SaveSlot = QuicksaveSlot | LevelStartSlot
deriving (Eq,Ord)
data Magnet = Magnet
{ _mgID :: Int
, _mgUpdate :: Magnet -> Maybe Magnet
, _mgPos :: Point2
, _mgField :: Magnet -> Particle -> Particle
}
data OptionScreenFlag = NormalOptions | GameOverOptions
data ScreenLayer
= OptionScreen
@@ -230,6 +238,7 @@ data Creature = Creature
, _crInvSel :: Int
, _crInvCapacity :: Int
, _crInvLock :: Bool
, _crInvEquipped :: IS.IntSet
, _crLeftInvSel :: Maybe Int
, _crState :: CreatureState
, _crCorpse :: Picture
@@ -308,6 +317,7 @@ data ItemUse
, _useDelay :: UseDelay
, _useHammer :: HammerType
}
| EquipUse
| NoUse
_itUseAimStance :: Item -> AimStance
_itUseAimStance = _aimStance . _useAim . _itUse
@@ -524,6 +534,7 @@ data GunBarrels
}
| RotBarrel
{ _brlNum :: Int
, _brlInaccuracy :: Float
}
| SingleBarrel {_brlInaccuracy :: Float}
@@ -914,3 +925,4 @@ makeLenses ''ItemTweaks
makeLenses ''Maybe'
makeLenses ''InventoryMode
makeLenses ''ItemPortage
makeLenses ''Magnet