Complete.Org:
Mailing Lists:
Archives:
freeciv-dev:
December 2003: [Freeciv-Dev] (PR#7048) Show how many shields are needed to complete a w |
[Freeciv-Dev] (PR#7048) Show how many shields are needed to complete a w[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=7048 > This transaction appears to have no content <<< multipart/signed; boundary="----------=_1070645395-2933-1": Unrecognized >>> Hello, This patch from Filip van Raemdonck adds a tip to the caravan dialog, allowing the player to easily know if it's worth helping build the wonder or not. It's against 1.14.1. Jordi -- Jordi Mallach Pérez -- Debian developer http://www.debian.org/ jordi@xxxxxxxxxxxxxx jordi@xxxxxxxxxx http://www.sindominio.net/ GnuPG public key information available at http://oskuro.net/~jordi/ --- freeciv-1.14.1.orig/client/gui-gtk-2.0/dialogs.c +++ freeciv-1.14.1/client/gui-gtk-2.0/dialogs.c @@ -1078,12 +1078,23 @@ void popup_caravan_dialog(struct unit *punit, struct city *phomecity, struct city *pdestcity) { - char buf[128]; - + char buf[128], wonder[64]; + gboolean wonderhelp; + my_snprintf(buf, sizeof(buf), _("Your caravan from %s reaches the city of %s.\nWhat now?"), phomecity->name, pdestcity->name); - + + if(unit_can_help_build_wonder(punit, pdestcity)) + { + my_snprintf(wonder, sizeof(wonder), _("Help build _Wonder (%d remaining)"),+ improvement_value(pdestcity->currently_building) - pdestcity->shield_stock); + wonderhelp = TRUE; + } + else { + my_snprintf(wonder, sizeof(wonder), _("Help build _Wonder")); + wonderhelp = FALSE; + } + caravan_city_id=pdestcity->id; /* callbacks need these */ caravan_unit_id=punit->id; @@ -1091,7 +1102,7 @@ _("Your Caravan Has Arrived"), buf, _("Establish _Traderoute"),caravan_establish_trade_callback, NULL, - _("Help build _Wonder"),caravan_help_build_wonder_callback, NULL, + wonder ,caravan_help_build_wonder_callback, NULL, _("_Keep moving"), NULL, NULL, NULL); @@ -1102,7 +1113,7 @@ message_dialog_button_set_sensitive(caravan_dialog, 0, FALSE); } - if (!unit_can_help_build_wonder(punit, pdestcity)) { + if (!wonderhelp) { message_dialog_button_set_sensitive(caravan_dialog, 1, FALSE); } }
signature.asc
|