This commit is contained in:
2025-05-31 08:17:26 +01:00
parent cdf300b824
commit ceb7a4f04c
6 changed files with 99 additions and 133 deletions
+11 -9
View File
@@ -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) =