fix #H4468 - [no-]autopickup in shop

Autopickup for pickup_types is disabled for unpaid shop goods, but
always-pick-up autopickup_exception still picked things up, as did
pickup_thrown for thrown objects.  Now they'll only work in shops
for no_charge items (dropped by hero and shk didn't want, or hero
declined to sell).

costly_spot() was being recalculated for every item which passed
pickup_types.  This changes autopickup to check it once for a given
autopickup operation and cache the result.  [Whenever the hero moves,
a room entry check is performed.  That ought to be extended to cache
costly_spot() for <u.ux,u.uy> in iflags or u.]
This commit is contained in:
PatR
2016-08-05 19:17:47 -07:00
parent 694b32cae2
commit 7f8e8293f9
2 changed files with 33 additions and 17 deletions

View File

@@ -346,6 +346,8 @@ fix for long lines in config file (28-Jan-2016) made 'O' command's 'list' and
message types, and autopickup exceptions subject to buffer overflow
when picking a destination for #jump, '$' to show valid dest. is more accurate
enchant armor gave "your pair of boots/gloves glow", should have been "glows"
when autopickup is overridden in a shop, always-pick-up exceptions and
pickup_thrown still picked unpaid items up
Platform- and/or Interface-Specific Fixes