Require weapon also primed on ammo check
This commit is contained in:
@@ -124,10 +124,11 @@ withThickSmokeI eff item cr w = eff item cr
|
||||
-- TODO create a trigger that does different things on first and continued
|
||||
-- fire.
|
||||
ammoCheckI :: ChainEffect
|
||||
ammoCheckI eff item cr w
|
||||
| _laLoaded (_itConsumption item) <= 0 = w -- fromMaybe w (startReloadingWeapon cr w)
|
||||
-- | _reloadState (_itConsumption item) /= Nothing' = w
|
||||
| otherwise = eff item cr $ w & creatures . ix (_crID cr) %~ crCancelReloading
|
||||
ammoCheckI eff itm cr w
|
||||
| _laLoaded ic <= 0 || not (_laPrimed ic) = w
|
||||
| otherwise = eff itm cr $ w & creatures . ix (_crID cr) %~ crCancelReloading
|
||||
where
|
||||
ic = _itConsumption itm
|
||||
|
||||
-- combined ammo and hammer check: want to be able to auto-reload even if the
|
||||
-- hammer is down?
|
||||
|
||||
Reference in New Issue
Block a user