Move hotkeys out of Creature into LWorld

This commit is contained in:
2024-12-19 15:29:20 +00:00
parent 4526119fcd
commit 910c683eac
11 changed files with 24 additions and 19 deletions
+3 -3
View File
@@ -71,8 +71,8 @@ rmInvItem cid invid w =
& removeanyactivation
-- & pointcid . crHotkeys . each %~ g
& cWorld . lWorld . hotkeys . each %~ g
& pointcid . crInvHotkeys %~ IM.delete invid
& pointcid . crInvHotkeys %~ IM.mapKeys g
& cWorld . lWorld . imHotkeys %~ IM.delete invid
& cWorld . lWorld . imHotkeys %~ IM.mapKeys g
& updateselection
& updateselectionextra
& pointcid %~ updateRootItemID
@@ -101,7 +101,7 @@ rmInvItem cid invid w =
. itLocation . ilEquipPosition . _Just
return $ pointcid . crEquipment . at epos .~ Nothing
removeanyactivation = fromMaybe id $ do
epos <- w ^? cWorld . lWorld . creatures . ix cid . crInvHotkeys . ix invid
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