Author: cazfi Date: Sat Nov 7 09:46:59 2015 New Revision: 30453 URL: http://svn.gna.org/viewcvs/freeciv?rev=30453&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: trunk/server/techtools.c Modified: trunk/server/techtools.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/techtools.c?rev=30453&r1=30452&r2=30453&view=diff ============================================================================== --- trunk/server/techtools.c (original) +++ trunk/server/techtools.c Sat Nov 7 09:46:59 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