diff --git a/src/Dodge/Item/Weapon/TriggerType.hs b/src/Dodge/Item/Weapon/TriggerType.hs index dc5eb5c39..50e34c9b7 100644 --- a/src/Dodge/Item/Weapon/TriggerType.hs +++ b/src/Dodge/Item/Weapon/TriggerType.hs @@ -138,14 +138,17 @@ withThickSmokeI eff item cr w = ammoCheckI :: ChainEffect ammoCheckI eff itm cr w = case itm ^? itUse . heldConsumption . laSource of Just (InternalSource ia) | _iaLoaded ia <= 0 || not (_iaPrimed ia) - -> w + -> failsound w Just AboveSource | fromMaybe True $ do invid <- itm ^? itLocation . ipInvID x <- cr ^? crInv . ix (invid - 1) . itUse . equipEffect . eeUse . euseAmmoAmount return $ x <= 0 - -> w + -> failsound w _ -> eff itm cr $ w & cWorld . lWorld . creatures . ix (_crID cr) %~ crCancelReloading - + where + failsound = case w ^? input . mouseButtons . ix SDL.ButtonLeft of + Just 0 -> soundStart (CrReloadSound (_crID cr)) (_crPos cr) click1S Nothing + _ -> soundContinue (CrReloadSound (_crID cr)) (_crPos cr) click1S Nothing itUseCharge :: Int -> Item -> Item itUseCharge x = itUse . leftConsumption . arLoaded %~ (max 0 . subtract x)