diff --git a/doc/fixes36.1 b/doc/fixes36.1 index 78ad1acc2..93a7da565 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -205,9 +205,14 @@ when attacking a monster with a rust or corrosion or acid passive counter-attack, grease wasn't protecting the attacker's weapon the Bell of Opening now correctly reports when it opens a trapdoor/hole knocking can no longer send a monster through a trapdoor/hole and desaddle it -the game no longer gets confused when you break an item while in a different - shop +game no longer gets confused when you break an unpaid shop item while inside + a different shop shopkeepers now correctly handle nested containers and gold in containers +for menustyle traditional, 'D' followed by (B|U|C|X)&m presented a menu of + everything, not just invent subset matching specified BUCX categories +for menustyles traditional or combination, 'A' (or object ID) followed by i + displayed an inventory of everything rather than just worn items (or + not fully identified items) post-3.6.0: fix "object lost" panic during pickup caused by sortloot revamp post-3.6.0: more sortloot revisions diff --git a/src/invent.c b/src/invent.c index ae1ce3bd0..6219f8330 100644 --- a/src/invent.c +++ b/src/invent.c @@ -1594,13 +1594,23 @@ unsigned *resultflags; ilets[iletct] = '\0'; for (;;) { - Sprintf(qbuf, "What kinds of thing do you want to %s? [%s]", word, - ilets); + Sprintf(qbuf, "What kinds of thing do you want to %s? [%s]", + word, ilets); getlin(qbuf, buf); if (buf[0] == '\033') return 0; if (index(buf, 'i')) { - if (display_inventory((char *) 0, TRUE) == '\033') + char ailets[1+26+26+1+5+1]; /* $ + a-z + A-Z + # + slop + \0 */ + struct obj *otmp; + + /* applicable inventory letters; if empty, show entire invent */ + ailets[0] = '\0'; + if (ofilter) + for (otmp = invent; otmp; otmp = otmp->nobj) + /* index() check: limit overflow items to one '#' */ + if ((*ofilter)(otmp) && !index(ailets, otmp->invlet)) + (void) strkitten(ailets, otmp->invlet); + if (display_inventory(ailets, TRUE) == '\033') return 0; } else break; @@ -1684,7 +1694,9 @@ unsigned *resultflags; } if (m_seen) { - return (allflag || (!oletct && ckfn != ckunpaid)) ? -2 : -3; + return (allflag + || (!oletct && ckfn != ckunpaid && ckfn != ckvalidcat)) + ? -2 : -3; } else if (flags.menu_style != MENU_TRADITIONAL && combo && !allflag) { return 0; #if 0 @@ -2137,7 +2149,10 @@ long *out_cnt; anything any; menu_item *selected; - if (flags.perm_invent && ((lets && *lets) || xtra_choice)) { + if (lets && !*lets) + lets = 0; /* simplify tests: (lets) instead of (lets && *lets) */ + + if (flags.perm_invent && (lets || xtra_choice)) { /* partial inventory in perm_invent setting; don't operate on full inventory window, use an alternate one instead; create the first time needed and keep it for re-use as needed later */