From fedf20b3430918e5e756c2e535c0f1c02663252d Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Sat, 2 Jul 2022 17:08:30 +0300
Subject: [PATCH 42/42] 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 <cazfi74@gmail.com>
---
 client/helpdata.c | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/client/helpdata.c b/client/helpdata.c
index 3cce18e4b6..a9a6725c61 100644
--- a/client/helpdata.c
+++ b/client/helpdata.c
@@ -1363,13 +1363,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.' */
-                   _("%s Allows all players with knowledge of %s "
-                     "to build %s units.\n"), BULLET,
-                   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.' */
+                     _("%s Allows all players with knowledge of %s "
+                       "to build %s units.\n"), BULLET,
+                     advance_name_translation(u->require_advance),
+                     utype_name_translation(u));
+      } else {
+        cat_snprintf(buf, bufsz,
+                     /* TRANS: 'Allows all players to build nuclear units.' */
+                     _("%s Allows all players to build %s units.\n"), BULLET,
+                     utype_name_translation(u));
+      }
     }
   }
 
-- 
2.35.1