Make reloading based upon creature stance

This commit is contained in:
2022-06-20 00:53:47 +01:00
parent 8d457033a2
commit 2f4b381484
11 changed files with 91 additions and 77 deletions
+3 -3
View File
@@ -208,7 +208,7 @@ targetLaserUpdate it cr w t
wpammo = _itConsumption it
reloadFrac
| _laLoaded wpammo == 0 = 1
| otherwise = case _laReloadState wpammo of
Just' rs -> fromIntegral rs / fromIntegral (_laReloadTime wpammo)
Nothing' -> 1
| otherwise = case _laTransfer wpammo of
Transfer _ rs -> fromIntegral rs / fromIntegral (_laReloadTime wpammo)
NoTransfer -> 1
col = mixColors reloadFrac (1-reloadFrac) blue red