Fold aiming parameters into item use datatype
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user