Remove left click to equip items
This commit is contained in:
@@ -48,12 +48,12 @@ useLeftItem cid w
|
||||
|
||||
useLeftItem' :: Int -> World -> World
|
||||
useLeftItem' cid w = case cr ^? crInv . ix crinvsel . itUse of
|
||||
Just EquipUse{} -> w
|
||||
& lSelHammerPosition .~ HammerDown
|
||||
& case _lSelHammerPosition w of
|
||||
HammerUp -> creatures . ix cid %~ toggleEquipmentAt crinvsel
|
||||
_ -> id
|
||||
Just LeftUse {_lUse = f} -> f cr crinvsel (w & creatures . ix cid . crLeftInvSel ?~ crinvsel)
|
||||
-- Just EquipUse{} -> w
|
||||
-- & lSelHammerPosition .~ HammerDown
|
||||
-- & case _lSelHammerPosition w of
|
||||
-- HammerUp -> creatures . ix cid %~ toggleEquipmentAt crinvsel
|
||||
-- _ -> id
|
||||
-- Just LeftUse {_lUse = f} -> f cr crinvsel (w & creatures . ix cid . crLeftInvSel ?~ crinvsel)
|
||||
_ -> case _crLeftInvSel cr of
|
||||
Just invid -> case _itUse $ _crInv cr IM.! invid of
|
||||
LeftUse {_lUse = f} -> f cr invid w
|
||||
|
||||
Reference in New Issue
Block a user