Remove _crInvEquipped

This commit is contained in:
2024-12-19 12:44:34 +00:00
parent 80b03e6544
commit 11b5ef74c5
8 changed files with 21 additions and 17 deletions
+5 -3
View File
@@ -66,8 +66,8 @@ rmInvItem cid invid w =
& pointcid . crInv %~ f -- important
& removeAnySlotEquipment
& pointcid . crEquipment . each %~ g
& pointcid . crInvEquipped %~ IM.delete invid
& pointcid . crInvEquipped %~ IM.mapKeys g
-- & pointcid . crInvEquipped %~ IM.delete invid
-- & pointcid . crInvEquipped %~ IM.mapKeys g
& removeanyactivation
& pointcid . crHotkeys . each %~ g
& pointcid . crInvHotkeys %~ IM.delete invid
@@ -95,7 +95,9 @@ 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 . crInvEquipped . ix invid
epos <- w ^? cWorld . lWorld . creatures . ix cid . crInv . ix invid
. itLocation . ilEquipPosition . _Just
return $ pointcid . crEquipment . at epos .~ Nothing
removeanyactivation = fromMaybe id $ do
epos <- w ^? cWorld . lWorld . creatures . ix cid . crInvHotkeys . ix invid