From 6e501234a1cd9c2e7aed3385cd6fa1ab4de03b92 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 2 Jul 2022 17:12:31 +0300 Subject: [PATCH 28/28] helpdata.c: Check if building-enabled nuke has tech requirement Don't just assume that there's a tech requirement to show. See #44941 Signed-off-by: Marko Lindqvist --- client/helpdata.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/client/helpdata.c b/client/helpdata.c index 8cb78695a1..e1a59aa260 100644 --- a/client/helpdata.c +++ b/client/helpdata.c @@ -1356,13 +1356,20 @@ char *helptext_building(char *buf, size_t bufsz, struct player *pplayer, } action_list_iterate_end; if (u) { - cat_snprintf(buf, bufsz, - /* TRANS: 'Allows all players with knowledge of atomic - * power to build nuclear units.' */ - _("* Allows all players with knowledge of %s " - "to build %s units.\n"), - advance_name_translation(u->require_advance), - utype_name_translation(u)); + if (advance_number(u->require_advance) != A_NONE) { + cat_snprintf(buf, bufsz, + /* TRANS: 'Allows all players with knowledge of atomic + * power to build nuclear units.' */ + _("* Allows all players with knowledge of %s " + "to build %s units.\n"), + advance_name_translation(u->require_advance), + utype_name_translation(u)); + } else { + cat_snprintf(buf, bufsz, + /* TRANS: 'Allows all players to build nuclear units.' */ + _("* Allows all players to build %s units.\n"), + utype_name_translation(u)); + } } } -- 2.35.1