Allow a spring and hardware to make weapons automatic

This commit is contained in:
2024-12-23 16:29:10 +00:00
parent 205c0a5c19
commit 90ec2a3738
6 changed files with 87 additions and 55 deletions
+4 -1
View File
@@ -49,10 +49,13 @@ type ChainEffect =
hammerCheck :: ChainEffect
hammerCheck f it cr w = case it ^? ldtValue . itUse . heldTriggerType of
Just HammerTrigger -> case w ^? input . mouseButtons . ix SDL.ButtonLeft of
Just HammerTrigger | nomakeauto
-> case w ^? input . mouseButtons . ix SDL.ButtonLeft of
Just 0 -> f it cr w
_ -> w
_ -> f it cr w
where
nomakeauto = not . isJust $ lookup MakeAutoLink (it ^. ldtRight)
-- | Applies a world effect after an item use cooldown check.
useTimeCheck :: ChainEffect