Cleanup, stop assigning hotkeys to unequipped items

This commit is contained in:
2023-05-05 01:59:40 +01:00
parent aeefbd4c40
commit 031af611cd
13 changed files with 227 additions and 215 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
module Dodge.ItEffect where
import qualified IntMapHelp as IM
import Control.Lens
import Dodge.Data.World
import Dodge.Euse
@@ -49,7 +50,7 @@ chargeIfInInventory itm cr w =
chargeIfEquipped :: Item -> Creature -> World -> World
chargeIfEquipped itm cr
| Just invid == cr ^. crLeftInvSel . lisMPos =
| invid `IM.member` (cr ^. crInvHotkeys) =
ptrWpCharge %~ (min maxcharge . (+ 1))
| otherwise = ptrWpCharge .~ 0
where