Start keeping track of item equip status internally (partially done)
This commit is contained in:
@@ -72,6 +72,7 @@ tryPutItemInInv cid flit w = case maybeInvSlot of
|
||||
, _ilIsRoot = False
|
||||
, _ilIsSelected = False
|
||||
, _ilIsAttached = False
|
||||
, _ilEquipPosition = Nothing
|
||||
}
|
||||
|
||||
---- should select the item on the floor if no inventory space?
|
||||
|
||||
@@ -72,6 +72,7 @@ crUpdateInvidLocations mo crid lw invid itm =
|
||||
, _ilIsRoot = Just invid == mo ^? imRootSelectedItem
|
||||
, _ilIsSelected = Just invid == mo ^? imSelectedItem
|
||||
, _ilIsAttached = invid `IS.member` (mo ^. imAttachedItems)
|
||||
, _ilEquipPosition = lw ^? creatures . ix crid . crInvEquipped . ix invid
|
||||
}
|
||||
|
||||
-- this should be looked at, as it is sometimes used in functions that need not
|
||||
|
||||
Reference in New Issue
Block a user