Commit before removing stackable items
This commit is contained in:
@@ -16,7 +16,7 @@ droneLauncher =
|
||||
& itUse . heldAim . aimWeight .~ 8
|
||||
& itUse . heldAim . aimRange .~ 0.5
|
||||
& itUse . heldAim . aimStance .~ TwoHandOver
|
||||
& itUse . heldConsumption .~ [DroneAmmo]
|
||||
& itUse . heldAmmoTypes .~ [DroneAmmo]
|
||||
& itType . iyBase .~ HELD DRONELAUNCHER
|
||||
|
||||
lasDronesPic :: Item -> SPic
|
||||
|
||||
@@ -145,13 +145,13 @@ ammoCheckI eff ams itm cr w = fromMaybe (failsound w) $ do
|
||||
x <- ams ^? ix 0 . itUse . amagLoadStatus . iaLoaded
|
||||
guard $ x > 0
|
||||
matype <- ams ^? ix 0 . itUse . amagType
|
||||
iatype <- itm ^? itUse . heldConsumption . ix 0
|
||||
iatype <- itm ^? itUse . heldAmmoTypes . ix 0
|
||||
guard $ matype == iatype
|
||||
return $ eff ams 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
|
||||
Just 0 -> soundStart (CrWeaponSound (_crID cr) 0) (_crPos cr) click1S Nothing
|
||||
_ -> soundContinue (CrWeaponSound (_crID cr) 0) (_crPos cr) click1S Nothing
|
||||
|
||||
itUseCharge :: Int -> Item -> Item
|
||||
itUseCharge x = itUse . leftConsumption . arLoaded %~ (max 0 . subtract x)
|
||||
|
||||
Reference in New Issue
Block a user