Add fields to determine an item's inventory position/whether it is held

This commit is contained in:
2022-04-11 13:32:06 +01:00
parent d46d315203
commit c686d9e111
14 changed files with 107 additions and 113 deletions
+5 -2
View File
@@ -406,6 +406,8 @@ data Item = Item
, _itType :: CombineType
, _itAttachment :: ItAttachment
, _itID :: Maybe Int
, _itInvPos :: Maybe Int
, _itIsHeld :: Bool
, _itEffect :: ItEffect
, _itInvSize :: Float
, _itInvDisplay :: Item -> [String]
@@ -429,8 +431,9 @@ data Targeting
= NoTargeting
| TargetingOnHeld
{ _tgPos :: Maybe Point2
, _tgUpdate :: Item -> Creature -> World -> Targeting -> (World, Targeting)
, _tgDraw :: Int -> Item -> Creature -> World -> Picture
, _tgHeldUpdate :: Item -> Creature -> World -> Targeting -> (World, Targeting)
, _tgNotHeldUpdate :: Item -> Creature -> World -> Targeting -> (World, Targeting)
, _tgDraw :: Int -> Item -> Creature -> Configuration -> World -> Picture
, _tgID :: Maybe Int
, _tgActive :: Bool
}