Remove unnecessary item held/worn field type
This commit is contained in:
@@ -18,10 +18,11 @@ import Control.Lens
|
||||
import Data.Maybe
|
||||
|
||||
itemEquipPict :: Creature -> Item -> SPic
|
||||
itemEquipPict cr it = case _dimPortage (_itDimension it) of
|
||||
HeldItem {} -> pictureWeaponOnAim cr it
|
||||
WornItem -> pictureOnEquip (itSPic it) cr it
|
||||
NoPortage -> mempty
|
||||
itemEquipPict cr it = case it ^?! itUse of
|
||||
RightUse {} -> pictureWeaponOnAim cr it
|
||||
ituse -> case ituse ^? eqEq of
|
||||
Just _ -> pictureOnEquip (itSPic it) cr it
|
||||
Nothing -> mempty
|
||||
|
||||
pictureWeaponOnAim
|
||||
:: Creature
|
||||
@@ -72,7 +73,7 @@ pictureWeaponOnAimItem p' cr posInInv
|
||||
_ -> 0
|
||||
theIt = _crInv cr IM.! posInInv
|
||||
p = fromMaybe p' $ do
|
||||
x <- theIt ^? itDimension . dimPortage . handlePos
|
||||
x <- theIt ^? itUse . useAim . aimHandlePos
|
||||
return $translateSPf (-x) 0 p'
|
||||
isOneHand = theIt ^? itUseAimStance == Just OneHand
|
||||
|| isNothing (theIt ^? itUseAimStance)
|
||||
|
||||
Reference in New Issue
Block a user