Move further towards removing _crInvEquipped

This commit is contained in:
2024-12-19 12:29:17 +00:00
parent 7e0184a54d
commit 80b03e6544
11 changed files with 82 additions and 97 deletions
+2 -1
View File
@@ -25,7 +25,8 @@ newHotkey cr = fromMaybe maxBound $ find (not . (`M.member` usedhks)) [minBound
-- requires there actually is equipment in the slot, too
assignHotkey :: Int -> Hotkey -> Creature -> Creature
assignHotkey invid hk cr = fromMaybe cr $ do
guard (invid `IM.member` (cr ^. crInvEquipped))
--guard (invid `IM.member` (cr ^. crInvEquipped))
guard $ isJust $ cr ^? crInv . ix invid . itLocation . ilEquipPosition . _Just
_ <- cr ^? crInv . ix invid . itUse . leftUse
return $ (setHotkey invid hk . moveOldHotkey invid hk) cr