Allow to equip left click items

This commit is contained in:
2021-11-27 02:01:12 +00:00
parent 774808663a
commit e7ea7377e2
21 changed files with 93 additions and 116 deletions
+6 -41
View File
@@ -292,47 +292,10 @@ data ItemPos
data Item' = Item'
{ _iName :: String
, _iIdentity :: ItemIdentity
, _iType :: ItemType
, _iType :: Item
, _iID :: Int
, _itPos :: ItemPos
}
data ItemType = TargetItem
{ _tiMaxAmmo :: Int
, _tiLoadedAmmo :: Int
, _tiAmmo :: Ammo
, _tiReloadTime :: Int
, _tiReloadState :: Int
, _tiReloadType :: ReloadType
, _tiMaxWarmUp :: Int
, _tiCurWarmUp :: Int
, _tiMaxCoolDown :: Int
, _tiCurCoolDown :: Int
, _tiUseRate :: Int
, _tiUseTime :: Int
, _tiUse :: Item -> Creature -> World -> World
, _tiUseModifiers :: [(Item -> Creature -> World -> World) -> Item -> Creature -> World -> World]
, _tiSpread :: Float
, _tiRange :: Float
, _tiHammer :: HammerPosition
, _tiDraw :: Item -> SPic
, _tiAimingSpeed :: Float
, _tiAimingRange :: Float
, _tiZoom :: ItZoom
, _tiAimZoom :: ItZoom
, _tiEquipDraw :: Creature -> Int -> SPic
, _tiScroll :: Float -> Creature -> Item -> Item
, _tiAttachment :: ItAttachment
, _tiEffect :: ItEffect
, _tiInvDisplay :: Item -> String
, _tiInvColor :: Color
, _tiTargeting :: Maybe (World -> Maybe Point2, Int -> Item -> Creature -> World -> Picture)
, _tiWorldTrigger :: Maybe (Int -> World -> Bool)
, _tiAimStance :: AimStance
, _tiNumBarrels :: Int
, _tiDimension :: ItemDimension
, _tiCurseStatus :: CurseStatus
}
data Item
= Weapon
{ _itName :: String
@@ -348,9 +311,10 @@ data Item
, _wpCurCoolDown :: Int
, _itUseRate :: Int
, _itUseTime :: Int
, _itUse :: Item -> Creature -> World -> World
, _itUse :: Either (Creature -> Int -> World -> World)
(Item -> Creature -> World -> World)
, _itUseModifiers :: [(Item -> Creature -> World -> World) -> Item -> Creature -> World -> World]
, _itLeftClickUse :: Maybe (Creature -> Int -> World -> World)
--, _itLeftClickUse :: Maybe (Creature -> Int -> World -> World)
, _wpSpread :: Float
, _wpRange :: Float
, _itHammer :: HammerPosition
@@ -430,7 +394,8 @@ data Item
, _itFloorPict :: Item -> SPic
, _twMaxRange :: Float
, _twAccuracy :: Float
, _itUse :: Item -> Creature -> World -> World
, _itUse :: Either (Creature -> Int -> World -> World)
(Item -> Creature -> World -> World)
, _itUseRate :: Int
, _itUseTime :: Int
, _itUseModifiers :: [(Item -> Creature -> World -> World) -> Item -> Creature -> World -> World]