Re-add twist when reloading, stop reload when full ammo

This commit is contained in:
2022-06-22 20:41:37 +01:00
parent 2ebad5da2a
commit fff5c87092
3 changed files with 4 additions and 1 deletions
+2 -1
View File
@@ -73,7 +73,8 @@ wasdDir = foldr ((+.+) . wasdM) (V2 0 0) . _keys
{- | Set posture according to mouse presses. -}
mouseActionsCr :: M.Map SDL.MouseButton Bool -> Creature -> Creature
mouseActionsCr pkeys cr
| rbPressed = cr & crStance . posture .~ Aiming
| rbPressed && cr ^?! crInvSel . iselAction == NoInvSelAction
= cr & crStance . posture .~ Aiming
| otherwise = cr & crStance . posture .~ AtEase
where
rbPressed = SDL.ButtonRight `M.member` pkeys