Split item consumables from item use

This commit is contained in:
2024-12-18 19:35:39 +00:00
parent db8e26b99d
commit 5600b29714
8 changed files with 63 additions and 59 deletions
+2 -2
View File
@@ -53,8 +53,8 @@ ammoMagSPic it = \case
_ -> noPic $ upperPrismPolyTS 1 (rectNSWE 0 (- y) (-1) 1)
where
y = fromIntegral y' * 0.3
y' = fromMaybe 0 $ it ^? itUse . amagLoadStatus . iaLoaded
am = fractionLoadedAmmo (it ^?! itUse . amagLoadStatus)
y' = fromMaybe 0 $ it ^? itConsumables . magLoadStatus . iaLoaded
am = fractionLoadedAmmo (it ^?! itConsumables . magLoadStatus)
fractionLoadedAmmo :: ReloadStatus -> Float
fractionLoadedAmmo rs = fromIntegral (_iaLoaded rs) / fromIntegral (_iaMax rs)