Cleanup
This commit is contained in:
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user