Merge branch 'NetHack-3.6'

This commit is contained in:
nhmall
2019-10-04 09:11:29 -04:00
7 changed files with 1465 additions and 1446 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 pickup.c $NHDT-Date: 1562203851 2019/07/04 01:30:51 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.229 $ */
/* NetHack 3.6 pickup.c $NHDT-Date: 1570142736 2019/10/03 22:45:36 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.234 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1051,11 +1051,13 @@ int how; /* type of query */
if (curr) {
*pick_list = (menu_item *) alloc(sizeof(menu_item));
(*pick_list)->item.a_int = curr->oclass;
return 1;
n = 1;
} else {
debugpline0("query_category: no single object match");
n = 0;
}
return 0;
/* early return is ok; there's no temp window yet */
return n;
}
win = create_nhwindow(NHW_MENU);
@@ -1108,7 +1110,8 @@ int how; /* type of query */
pack++;
if (invlet >= 'u') {
impossible("query_category: too many categories");
return 0;
n = 0;
goto query_done;
}
} while (*pack);
@@ -1168,6 +1171,7 @@ int how; /* type of query */
}
end_menu(win, qstr);
n = select_menu(win, how, pick_list);
query_done:
destroy_nhwindow(win);
if (n < 0)
n = 0; /* caller's don't expect -1 */