From 3c70918c529ec14a71ee17f17b66efa1fa3682bf Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 21 Apr 2025 07:16:04 -0700 Subject: [PATCH] disclosure of geno'd and/or extinct species If there is at least one genocided or extinct type of monster, final disclosure asks if you want to see the list. It was using "ynaq" for the choice of answer, where 'a' is used to prompt for sort order rather than "all". Change it to only include the 'a' choice if there are more than 1 of either category or 1 each of both categories (since they're listed interspersed with each other, sorting is relevant for the one-of-each situation). --- src/insight.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/insight.c b/src/insight.c index a1c44b6c9..9f0f71059 100644 --- a/src/insight.c +++ b/src/insight.c @@ -3046,12 +3046,14 @@ list_genocided(char defquery, boolean ask) ngone = num_gone(mvflags, mindx); /* genocided or extinct species list */ - if (ngenocided != 0 || nextinct != 0) { + if (ngone > 0) { Sprintf(buf, "Do you want a list of %sspecies%s%s?", (nextinct && !ngenocided) ? "extinct " : "", (ngenocided) ? " genocided" : "", (nextinct && ngenocided) ? " and extinct" : ""); - c = ask ? yn_function(buf, ynaqchars, defquery, TRUE) : defquery; + c = ask ? yn_function(buf, (ngone > 1) ? "ynaq" : "ynq\033a", + defquery, TRUE) + : defquery; if (c == 'q') done_stopprint++; if (c == 'y' || c == 'a') {