Do not autopickup unpaid items in shops

This is overridden by pickup_thrown and autopickup
exceptions.
This commit is contained in:
Pasi Kallinen
2015-12-22 22:36:30 +02:00
parent cdde5b76c9
commit 91a7d393cd
2 changed files with 7 additions and 1 deletions
+1
View File
@@ -53,6 +53,7 @@ dipping fruit juice into enlightenment gave different result than the inverse
make travel walk up to a trap and stop when the trap blocks the only make travel walk up to a trap and stop when the trap blocks the only
way forward, instead of trying to go straight line way forward, instead of trying to go straight line
travel will displace pets rather than stop travel will displace pets rather than stop
do not autopickup unpaid items in shops
Platform- and/or Interface-Specific Fixes Platform- and/or Interface-Specific Fixes
+6 -1
View File
@@ -720,7 +720,12 @@ menu_item **pick_list; /* list of objects and counts to pick up */
/* first count the number of eligible items */ /* first count the number of eligible items */
for (n = 0, curr = olist; curr; curr = FOLLOW(curr, follow)) { for (n = 0, curr = olist; curr; curr = FOLLOW(curr, follow)) {
pickit = (!*otypes || index(otypes, curr->oclass)); /* pick if in pickup_types and not unpaid item in shop */
pickit = ((!*otypes || index(otypes, curr->oclass))
&& !(curr->where == OBJ_FLOOR
&& !curr->no_charge
&& isok(curr->ox, curr->oy)
&& costly_spot(curr->ox, curr->oy)));
/* check for "always pick up */ /* check for "always pick up */
if (!pickit) if (!pickit)
pickit = is_autopickup_exception(curr, TRUE); pickit = is_autopickup_exception(curr, TRUE);