Fold aiming parameters into item use datatype

This commit is contained in:
2021-11-27 18:10:05 +00:00
parent 8639b2d428
commit 652af6b0a9
24 changed files with 135 additions and 155 deletions
+4 -3
View File
@@ -68,9 +68,10 @@ pictureWeaponOnAimItem p cr posInInv
Just (Walking x LeftForward) -> f x * 50
_ -> 0
theIt = _crInv cr IM.! posInInv
isTwisting = _itAimStance theIt == TwoHandTwist
isOneHand = _itAimStance theIt == OneHand
isTwoHandFlat = _itAimStance theIt == TwoHandFlat
isTwisting = theIt ^? itUseAimStance == Just TwoHandTwist
isOneHand = theIt ^? itUseAimStance == Just OneHand
isTwoHandFlat = theIt ^? itUseAimStance == Just TwoHandFlat
itUseAimStance = itUse . useAim . aimStance
f i = 0.1 * fromIntegral (sLen - i) / fromIntegral sLen
sLen = _strideLength $ _crStance cr