Move further towards removing _crInvEquipped
This commit is contained in:
+2
-1
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user