Fix bug in item loc when combining items, rethink centralizing item locs
This commit is contained in:
@@ -33,11 +33,12 @@ tryPutItemInInv cid flit w = case maybeInvSlot of
|
||||
Just
|
||||
( i
|
||||
, w
|
||||
& updateItLocation i
|
||||
& cWorld . lWorld . floorItems . unNIntMap %~ IM.delete (_unNInt $ _flItID flit)
|
||||
& cWorld . lWorld . creatures . ix cid . crInv %~ IM.insert i it
|
||||
& updateItLocation i
|
||||
-- I forget whether using "at" rather than "IM.insert" here caused problems
|
||||
-- & cWorld . lWorld . creatures . ix cid . crInv . at i ?~ it
|
||||
& cWorld . lWorld %~ crUpdateItemLocations cid
|
||||
& setInvPosFromSS
|
||||
& cWorld . lWorld %~ crUpdateItemLocations cid
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user