Add lasCircle

This commit is contained in:
2022-07-08 22:14:44 +01:00
parent 68cb191063
commit ce533c22cb
8 changed files with 91 additions and 21 deletions
+3 -3
View File
@@ -25,7 +25,7 @@ useItem cr' w = fromMaybe (f w) $ do
itemEffect :: Creature -> Item -> World -> World
itemEffect cr it w = case it ^? itUse of
Just RightUse {_rUse = eff,_useMods = usemods}
-> hammerTest $ tryClickReload cr it w $ foldr ($) eff usemods it cr
-> hammerTest $ tryReload cr it w $ foldr ($) eff usemods it cr
Just LeftUse {} -> doequipmentchange
Just EquipUse{} -> doequipmentchange
-- ConsumeUse will cause problems if the item is not selected
@@ -40,8 +40,8 @@ itemEffect cr it w = case it ^? itUse of
doequipmentchange = setuhamdown $ hammerTest (toggleEquipmentAt (_rbOptions w) (crSel cr) cr
. activateEquipmentAt (_rbOptions w) cr)
tryClickReload :: Creature -> Item -> World -> (World -> World) -> World -> World
tryClickReload cr it w f
tryReload :: Creature -> Item -> World -> (World -> World) -> World -> World
tryReload cr it w f
| _crID cr == _yourID w && itNeedsLoading it && _mouseButtons w M.!? SDL.ButtonLeft == Just False
= crToggleReloading cr
| otherwise