more fixes for revised 'sortloot'

After some permutation of commands which displayed items, the 'd'
command presented a prompt with the list of letters scrambled (in
loot order or pack order rather than invlet order), so explicitly
sort when getobj operates.  Done for ggetobj too.

For menustyle:Traditional, ',' followed by 'm' presented a pickup
list in pile order even when sortloot was 'l' or 'f'.  That was an
unintentional change during the 'revamp'.
This commit is contained in:
PatR
2016-03-22 01:19:27 -07:00
parent 98b5f581bb
commit e8e8c14b34
4 changed files with 39 additions and 21 deletions

View File

@@ -2197,6 +2197,7 @@ register boolean newlev;
*ptr2 = '\0';
}
/* possibly deliver a one-time room entry message */
void
check_special_room(newlev)
register boolean newlev;
@@ -2327,11 +2328,13 @@ register boolean newlev;
return;
}
/* the ',' command */
int
dopickup()
{
int count;
struct trap *traphere = t_at(u.ux, u.uy);
/* awful kludge to work around parse()'s pre-decrement */
count = (multi || (save_cm && *save_cm == ',')) ? multi + 1 : 0;
multi = 0; /* always reset */
@@ -2372,6 +2375,7 @@ dopickup()
}
if (!OBJ_AT(u.ux, u.uy)) {
register struct rm *lev = &levl[u.ux][u.uy];
if (IS_THRONE(lev->typ))
pline("It must weigh%s a ton!", lev->looted ? " almost" : "");
else if (IS_SINK(lev->typ))