From e121eee867915293a473c5cbb909c2bb99e19db4 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 27 Oct 2022 17:25:14 -0700 Subject: [PATCH] end-of-game disclosure for gold in invent on tty Reported by entrez: disclosing inventory at end of game did not show gold. Not mentioned: only for tty. It was using the same window as gets used for perm_invent (although not shown _as_ perm_invent because end of game turns that off) and the default for whether to show gold is different for tty than for other interfaces due use of experimental TTYINV from player's environment. Force the end of game inventory disclosure to work the same as the dumplog inventory listing and use a different window, by falsely telling display_inventory() that a response is requested. Works but the whole inventory mechanism has become quite convoluted. --- src/end.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/end.c b/src/end.c index b97739a44..0b501bd6a 100644 --- a/src/end.c +++ b/src/end.c @@ -836,8 +836,9 @@ disclose(int how, boolean taken) ask = should_query_disclose_option('i', &defquery); c = ask ? yn_function(qbuf, ynqchars, defquery, TRUE) : defquery; if (c == 'y') { - /* caller has already ID'd everything */ - (void) display_inventory((char *) 0, FALSE); + /* caller has already ID'd everything; we pass 'want_reply=True' + to force display_pickinv() to avoid using WIN_INVENT */ + (void) display_inventory((char *) 0, TRUE); container_contents(g.invent, TRUE, TRUE, FALSE); } if (c == 'q')