Cleanup
This commit is contained in:
@@ -22,13 +22,10 @@ newHotkey lw = fromMaybe maxBound $
|
||||
|
||||
-- this will not remove the hotkey from its old slot, assumes there is a hotkey
|
||||
-- to swap with instead
|
||||
-- requires there actually is equipment in the slot, too
|
||||
assignHotkey :: Int -> Hotkey -> LWorld -> LWorld
|
||||
assignHotkey invid hk lw = fromMaybe lw $ do
|
||||
--guard (invid `IM.member` (cr ^. crInvEquipped))
|
||||
guard $ lw ^? creatures . ix 0 . crInv . ix invid . itUse . useCondition
|
||||
== Just UseableAnytime
|
||||
-- _ <- lw ^? creatures . ix 0 . crInv . ix invid . itUse . leftUse
|
||||
return $ (setHotkey invid hk . moveOldHotkey invid hk) lw
|
||||
|
||||
moveOldHotkey :: Int -> Hotkey -> LWorld -> LWorld
|
||||
|
||||
Reference in New Issue
Block a user