Add option to exclude dropped items from autopick

This is based on a feature in UnNetHack (and I think some other variants
as well).  If the hero intentionally drops an item with 'pickup_dropped'
disabled, don't autopick it back up when walking over that square again.

Typically when the player drops an item, it's because she doesn't want
it in her inventory any more, and this option stops autopickup from
defeating that goal (especially useful for tasks like stash management
without a container).  Players have come up with workarounds to this
problem like toggling autopickup when approaching their stash pile or
adding name-based autopickup exceptions to allow them to exclude
individual items from autopickup, but this behavior should reduce the
need for those things.

I think 'pickup_dropped' is a little unfortunate because it suggests
equivalence to 'pickup_thrown' (i.e. any dropped items will be
automatically picked up regardless of autopickup exceptions).  Calling
it something like 'nopick_dropped' might be better, but as far as I can
tell options cannot start with the word 'no' because it's interpreted as
a negation of the rest of the option name.
This commit is contained in:
Michael Meyer
2023-11-16 09:57:31 -05:00
committed by PatR
parent 275713b56e
commit d7d1c1476d
11 changed files with 41 additions and 7 deletions

View File

@@ -4809,6 +4809,15 @@ level (Unencumbered, Burdened, streSsed, straiNed, overTaxed,
or overLoaded), you will be asked if you want to continue.
(Default `S'). Persistent.
%.lp
\item[\ib{pickup\verb+_+dropped}]
If this option is on, items you dropped will be treated like normal items for
``{\it autopickup\/}'' purposes. If it disabled, items you dropped will not be
automatically picked up, even if ``{\it autopickup\/}'' is on and they are in
``{\it pickup\verb+_+types\/}'' or
match an autopickup exception.
Default is on.
Persistent.
%.lp
\item[\ib{pickup\verb+_+thrown}]
If this option is on and ``{\it autopickup\/}'' is also on, try to pick up
things that you threw, even if they aren't in