This commit is contained in:
2024-12-19 23:40:04 +00:00
parent f3cfe8cb5f
commit e1989eaa1e
28 changed files with 285 additions and 300 deletions
+1 -6
View File
@@ -66,10 +66,7 @@ rmInvItem cid invid w =
& pointcid . crInv %~ f -- important
& removeAnySlotEquipment
& pointcid . crEquipment . each %~ g
-- & pointcid . crInvEquipped %~ IM.delete invid
-- & pointcid . crInvEquipped %~ IM.mapKeys g
& removeanyactivation
-- & pointcid . crHotkeys . each %~ g
& cWorld . lWorld . hotkeys . each %~ g
& cWorld . lWorld . imHotkeys %~ IM.delete invid
& cWorld . lWorld . imHotkeys %~ IM.mapKeys g
@@ -96,13 +93,11 @@ rmInvItem cid invid w =
rmf <- itm ^? itEffect . ieOnDrop
return $ doInvEffect rmf itm cr
removeAnySlotEquipment = fromMaybe id $ do
--epos <- w ^? cWorld . lWorld . creatures . ix cid . crInvEquipped . ix invid
epos <- w ^? cWorld . lWorld . creatures . ix cid . crInv . ix invid
. itLocation . ilEquipPosition . _Just
. itLocation . ilEquipSite . _Just
return $ pointcid . crEquipment . at epos .~ Nothing
removeanyactivation = fromMaybe id $ do
epos <- w ^? cWorld . lWorld . imHotkeys . ix invid
--return $ pointcid . crHotkeys . at epos .~ Nothing
return $ cWorld . lWorld . hotkeys . at epos .~ Nothing
maxk = fmap fst $ IM.lookupMax $ cr ^. crInv
f inv =