Extend inv item location information to include "attached" items
This commit is contained in:
@@ -47,8 +47,15 @@ tryPutItemInInv cid flit w = case maybeInvSlot of
|
||||
where
|
||||
it = _flIt flit
|
||||
maybeInvSlot = checkInvSlotsYou it w
|
||||
-- not sure if the following is necessary
|
||||
updateItLocation invid w' = w' & cWorld . lWorld . itemLocations . ix (_itID it)
|
||||
.~ InInv cid invid False False
|
||||
.~ InInv
|
||||
{_ilCrID = cid
|
||||
, _ilInvID = invid
|
||||
, _ilIsRoot = False
|
||||
, _ilIsSelected = False
|
||||
, _ilIsAttached = False
|
||||
}
|
||||
|
||||
---- should select the item on the floor if no inventory space?
|
||||
--createAndSelectItem :: Item -> World -> World
|
||||
|
||||
Reference in New Issue
Block a user