Cleanup
This commit is contained in:
@@ -190,18 +190,20 @@ dropItem cr invid =
|
||||
youDropItem :: World -> World
|
||||
youDropItem w = fromMaybe w $ do
|
||||
curpos <-
|
||||
you w ^? crManipulation . manObject . imSelectedItem
|
||||
-- <|> fmap fst (IM.lookupMax =<< w ^? hud . hudElement . diSections . ix 0 . ssItems)
|
||||
<|> fmap fst (IM.lookupMax (you w ^. crInv))
|
||||
guard $ not $ _crInvLock (you w)
|
||||
return $
|
||||
w
|
||||
& dropItem cr curpos
|
||||
cr ^? crManipulation . manObject . imSelectedItem
|
||||
<|> fmap fst (IM.lookupMax (cr ^. crInv))
|
||||
guard $ not $ _crInvLock cr
|
||||
return $ case cr ^. crStance . posture of
|
||||
Aiming -> throwItem w
|
||||
AtEase -> dropItem cr curpos w
|
||||
where
|
||||
-- & soundStart (CrSound (_crID cr)) (_crPos cr) whiteNoiseFadeOutS Nothing
|
||||
|
||||
cr = you w
|
||||
|
||||
-- placeholder, remember to deal with two handed weapon twist
|
||||
-- should throw all attached items?
|
||||
throwItem :: World -> World
|
||||
throwItem = id
|
||||
|
||||
sizeSelf :: Float -> Creature -> World -> Maybe World
|
||||
sizeSelf x cr w
|
||||
| not (crOnWall cr1 w) =
|
||||
|
||||
Reference in New Issue
Block a user