Add fields to determine an item's inventory position/whether it is held
This commit is contained in:
+5
-2
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user