Cleanup, stop assigning hotkeys to unequipped items
This commit is contained in:
@@ -56,7 +56,7 @@ setMvPos w cr = cr & crIntention . mvToPoint .~ mpos
|
||||
mtpos = do
|
||||
tpos <- _crPos <$> _targetCr int
|
||||
guard $ hasLOSIndirect (_crPos cr) tpos w
|
||||
return $ tpos
|
||||
return tpos
|
||||
mpos = mtpos <|> _mvToPoint int
|
||||
|
||||
setViewPos :: World -> Creature -> Creature
|
||||
@@ -67,7 +67,7 @@ setViewPos w cr = cr & crIntention . viewPoint %~ ((<|> mpos) . (attentionViewPo
|
||||
attentionViewPoint :: World -> Creature -> Maybe Point2
|
||||
attentionViewPoint w cr = do
|
||||
attention <- cr ^? crPerception . cpAttention . getAttentiveTo
|
||||
cid <- (sortOn snd $ IM.toList attention) ^? ix 0 . _1
|
||||
cid <- sortOn snd (IM.toList attention) ^? ix 0 . _1
|
||||
tcr <- w ^? cWorld . lWorld . creatures . ix cid
|
||||
guard $ visionCheck cr (_crPos tcr) > 0
|
||||
return (_crPos tcr)
|
||||
|
||||
Reference in New Issue
Block a user