Remove inventory selection on item drop/pickup

This commit is contained in:
2024-11-04 19:45:12 +00:00
parent 3f9b31a838
commit 489ff21e12
6 changed files with 17 additions and 20 deletions
+3 -1
View File
@@ -76,13 +76,15 @@ rmInvItem cid invid w =
& pointcid . crInvHotkeys %~ IM.delete invid
& pointcid . crInvHotkeys %~ IM.mapKeys g
& updateselection
& updateselectionextra
& pointcid %~ updateRootItemID
& worldEventFlags . at InventoryChange ?~ ()
where
-- & updateCreatureItemLocations cid
pointcid = cWorld . lWorld . creatures . ix cid
updateselectionextra | cid == 0 = hud . hudElement . diSelectionExtra .~ 0
| otherwise = id
updateselection
| cid == 0 && cr ^? crManipulation . manObject . imSelectedItem == Just invid =
scrollAugInvSel (-1) . scrollAugInvSel 1 -- . updateInventorySectionItems