Make hotkeys assignable to any item, use item id
This commit is contained in:
@@ -66,10 +66,10 @@ rmInvItem cid invid w =
|
||||
& pointcid . crInv %~ f -- important
|
||||
& removeAnySlotEquipment
|
||||
& pointcid . crEquipment . each %~ g
|
||||
& removeanyactivation
|
||||
& cWorld . lWorld . hotkeys . each %~ g
|
||||
& cWorld . lWorld . imHotkeys %~ IM.delete invid
|
||||
& cWorld . lWorld . imHotkeys %~ IM.mapKeys g
|
||||
-- & removeanyactivation
|
||||
-- & cWorld . lWorld . hotkeys . each %~ g
|
||||
-- & cWorld . lWorld . imHotkeys %~ IM.delete invid
|
||||
-- & cWorld . lWorld . imHotkeys %~ IM.mapKeys g
|
||||
& updateselection
|
||||
& updateselectionextra
|
||||
& pointcid %~ updateRootItemID
|
||||
@@ -96,9 +96,9 @@ rmInvItem cid invid w =
|
||||
epos <- w ^? cWorld . lWorld . creatures . ix cid . crInv . ix invid
|
||||
. itLocation . ilEquipSite . _Just
|
||||
return $ pointcid . crEquipment . at epos .~ Nothing
|
||||
removeanyactivation = fromMaybe id $ do
|
||||
epos <- w ^? cWorld . lWorld . imHotkeys . ix invid
|
||||
return $ cWorld . lWorld . hotkeys . at epos .~ Nothing
|
||||
-- removeanyactivation = fromMaybe id $ do
|
||||
-- epos <- w ^? cWorld . lWorld . imHotkeys . ix invid
|
||||
-- return $ cWorld . lWorld . hotkeys . at epos .~ Nothing
|
||||
maxk = fmap fst $ IM.lookupMax $ cr ^. crInv
|
||||
f inv =
|
||||
let (xs, ys) = IM.split invid inv
|
||||
|
||||
Reference in New Issue
Block a user