Author: cazfi Date: Fri Dec 11 12:12:54 2015 New Revision: 30945 URL: http://svn.gna.org/viewcvs/freeciv?rev=30945&view=rev Log: Show direction and goods of the traderoute on client popup.
See patch #6661 Modified: trunk/client/citydlg_common.c Modified: trunk/client/citydlg_common.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/citydlg_common.c?rev=30945&r1=30944&r2=30945&view=diff ============================================================================== --- trunk/client/citydlg_common.c (original) +++ trunk/client/citydlg_common.c Fri Dec 11 12:12:54 2015 @@ -474,10 +474,29 @@ /* TRANS: "unknown" location */ const char *name = trade_city ? city_name(trade_city) : _("(unknown)"); - cat_snprintf(buf, bufsz, _("%+4d : Trade route with %s\n"), - proute->value - * (100 + get_city_bonus(pcity, EFT_TRADEROUTE_PCT)) / 100, - name); + switch (proute->dir) { + case RDIR_BIDIRECTIONAL: + cat_snprintf(buf, bufsz, _("%+4d : Trading %s with %s\n"), + proute->value + * (100 + get_city_bonus(pcity, EFT_TRADEROUTE_PCT)) / 100, + goods_name_translation(proute->goods), + name); + break; + case RDIR_FROM: + cat_snprintf(buf, bufsz, _("%+4d : Trading %s from %s\n"), + proute->value + * (100 + get_city_bonus(pcity, EFT_TRADEROUTE_PCT)) / 100, + goods_name_translation(proute->goods), + name); + break; + case RDIR_TO: + cat_snprintf(buf, bufsz, _("%+4d : Traing %s to %s\n"), + proute->value + * (100 + get_city_bonus(pcity, EFT_TRADEROUTE_PCT)) / 100, + goods_name_translation(proute->goods), + name); + break; + } total += proute->value; } trade_routes_iterate_end; } else if (otype == O_GOLD) { _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits