Allow for partial reloading
This commit is contained in:
@@ -81,8 +81,10 @@ itemLaserScopeEffect
|
||||
-- _ -> ep -.- 2 *.* unitVectorAtAngle d
|
||||
wpammo = _itConsumption $ (cr ^. crInv) IM.! invid
|
||||
reloadFrac
|
||||
| _wpLoadedAmmo wpammo == 0 = 1
|
||||
| otherwise = fromIntegral (_wpReloadState wpammo) / fromIntegral (_wpReloadTime wpammo)
|
||||
| _ammoLoaded wpammo == 0 = 1
|
||||
| otherwise = case _reloadState wpammo of
|
||||
Just' rs -> fromIntegral rs / fromIntegral (_reloadTime wpammo)
|
||||
Nothing' -> 1
|
||||
--col = mixColors reloadFrac (1-reloadFrac) red green
|
||||
{- | Automatically send out radar pulses that detect walls. -}
|
||||
autoRadarEffect :: ItEffect
|
||||
|
||||
Reference in New Issue
Block a user