Author: cazfi
Date: Sat Nov  7 09:47:18 2015
New Revision: 30454

URL: http://svn.gna.org/viewcvs/freeciv?rev=30454&view=rev
Log:
Tell name of the tech gained as a bonus tech when one is first to research 
certain another tech.

Reported anonymously

See bug #23402

Modified:
    branches/S2_6/server/techtools.c

Modified: branches/S2_6/server/techtools.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/techtools.c?rev=30454&r1=30453&r2=30454&view=diff
==============================================================================
--- branches/S2_6/server/techtools.c    (original)
+++ branches/S2_6/server/techtools.c    Sat Nov  7 09:47:18 2015
@@ -515,17 +515,30 @@
   }
 
   if (bonus_tech_hack) {
+    Tech_type_id additional_tech;
+
+    additional_tech = give_immediate_free_tech(presearch);
+
     if (advance_by_number(tech_found)->bonus_message) {
       notify_research(presearch, NULL, E_TECH_GAIN, ftc_server,
                       "%s", _(advance_by_number(tech_found)->bonus_message));
-    } else {
+      if (additional_tech != A_UNSET) {
+        notify_research(presearch, NULL, E_TECH_GAIN, ftc_server,
+                        /* TRANS: Got free tech. */
+                        _("Acquired %s"),
+                        research_advance_name_translation(presearch,
+                                                         additional_tech));
+      }
+    } else if (additional_tech != A_UNSET) {
+      /* FIXME: "your" when it was just civilization of one of the players
+       * sharing the reseach. */
       notify_research(presearch, NULL, E_TECH_GAIN, ftc_server,
                       _("Great scientists from all the "
-                        "world join your civilization: you get "
-                        "an immediate advance."));
-    }
-
-    give_immediate_free_tech(presearch);
+                        "world join your civilization: you learn "
+                        "%s immediately."),
+                      research_advance_name_translation(presearch,
+                                                        additional_tech));
+    }
   }
 }
 


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to