Space only picks up filtered close items
This commit is contained in:
@@ -176,11 +176,15 @@ dropExcept cr invid w =
|
||||
-- why not a cid (Int)?
|
||||
dropItem :: Creature -> Int -> World -> World
|
||||
dropItem cr invid =
|
||||
rmInvItem (_crID cr) invid
|
||||
maybeshiftseldown
|
||||
. rmInvItem (_crID cr) invid
|
||||
. copyItemToFloor (_crPos cr) itm -- . mayberemoveequip
|
||||
. soundStart (CrSound (_crID cr)) (_crPos cr) whiteNoiseFadeOutS Nothing
|
||||
where
|
||||
itm = fromMaybe (error "dropItem cannot find item") $ cr ^? crInv . ix invid
|
||||
maybeshiftseldown w = fromMaybe w $ do
|
||||
3 <- w ^? hud . hudElement . diSelection . _Just . _1
|
||||
return $ w & hud . hudElement . diSelection . _Just . _2 +~ 1
|
||||
|
||||
-- | Get your creature to drop the item under the cursor.
|
||||
youDropItem :: World -> World
|
||||
|
||||
Reference in New Issue
Block a user