Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2000:
[Freeciv-Dev] bug/fix: Cathedral etc helptext duplication (PR#534)
Home

[Freeciv-Dev] bug/fix: Cathedral etc helptext duplication (PR#534)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] bug/fix: Cathedral etc helptext duplication (PR#534)
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Thu, 24 Aug 2000 00:00:34 -0700 (PDT)

Currently helptexts shown in client for Cathedral, Colosseum, and 
Michelangelo's have duplicate information about technology effects:

- Added dynamically based on game.rtech.cathedral_minus etc
- Hardwired in helptexts in ruleset because game.rtech.cathedral_minus
  etc will be removed for generalised improvements.

Simplest fix at this time seems to be to remove the dynamic texts 
and just rely on the ruleset helptexts to have appropriate information.
(Patch attached.)

-- David
--- freeciv-cvs/client/helpdata.c       Mon Aug 14 22:38:44 2000
+++ fc-adv/client/helpdata.c    Thu Aug 24 16:52:52 2000
@@ -498,31 +498,6 @@
 *****************************************************************/
 
 /****************************************************************
-  Write text about cathedral techs: used by both
-  Cathedrals proper and Mich's Chapel Wonder.
-  Returns new end-of-string ptr.
-*****************************************************************/
-static void helptext_cathedral_techs(char *buf)
-{
-  int t;
-
-  assert(buf);
-  buf[0] = '\0';
-  t=game.rtech.cathedral_minus;
-  if(tech_exists(t)) {
-    sprintf(buf, _("The discovery of %s will reduce this by 1.  "),
-           advances[t].name);
-    buf += strlen(buf);
-  }
-  t=game.rtech.cathedral_plus;
-  if(tech_exists(t)) {
-    sprintf(buf, _("The discovery of %s will increase this by 1.  "),
-          advances[t].name);
-    buf += strlen(buf);
-  }
-}
-
-/****************************************************************
   Write misc dynamic text for improvements (not wonders).
   user_text is written after some extra, and before others.
 *****************************************************************/
@@ -551,18 +526,6 @@
   if (imp->helptext) {
     sprintf(buf+strlen(buf), "%s  ", _(imp->helptext));
   }
-  if(which==B_CATHEDRAL) {
-    helptext_cathedral_techs(buf+strlen(buf));
-  }
-  if(which==B_COLOSSEUM) {
-    int t=game.rtech.colosseum_plus;
-    if(tech_exists(t)) {
-      int n = strlen(buf);
-      if(n && buf[n-1] == '\n') buf[n-1] = ' ';
-      sprintf(buf+n, _("The discovery of %s will increase this by 1.  "),
-            advances[t].name);
-    }
-  }
   if(which==B_BARRACKS
      && tech_exists(improvement_types[B_BARRACKS].obsolete_by)
      && tech_exists(improvement_types[B_BARRACKS2].obsolete_by)) {
@@ -608,10 +571,6 @@
   }
   if (imp->helptext) {
     sprintf(buf+strlen(buf), "%s  ", _(imp->helptext));
-  }
-  if(which==B_MICHELANGELO) {
-    if (improvement_variant(B_MICHELANGELO)==0)
-      helptext_cathedral_techs(buf+strlen(buf));
   }
   if (strcmp(user_text, "")!=0) {
     sprintf(buf+strlen(buf), "\n\n%s", user_text);

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] bug/fix: Cathedral etc helptext duplication (PR#534), David Pfitzner <=