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
+3 -3
View File
@@ -182,17 +182,17 @@ scalp cr
fhead = colorSH (greyN 0.9) . upperPrismPolyHalf 5 $ polyCirc 4 5
oneH :: Creature -> Bool
oneH cr = crIsAiming' cr && crIt ^? itAimStance == Just OneHand
oneH cr = crIsAiming' cr && crIt ^? itUse . useAim . aimStance == Just OneHand
where
crIt = _crInv cr IM.! _crInvSel cr
twoFlat :: Creature -> Bool
twoFlat cr = crIsAiming' cr && crIt ^? itAimStance == Just TwoHandFlat
twoFlat cr = crIsAiming' cr && crIt ^? itUse . useAim . aimStance == Just TwoHandFlat
where
crIt = _crInv cr IM.! _crInvSel cr
twists :: Creature -> Bool
twists cr = crIsAiming' cr && crIt ^? itAimStance == Just TwoHandTwist
twists cr = crIsAiming' cr && crIt ^? itUse . useAim . aimStance == Just TwoHandTwist
where
crIt = _crInv cr IM.! _crInvSel cr