[Freeciv-Dev] (PR#3614) gui-sdl doesn't show nation group
http://bugs.freeciv.org/Ticket/Display.html?id=3614 > > [jdorje - Wed Mar 05 01:30:08 2003]: > > [jdorje - Wed Mar 5 01:25:46 2003]: > > > The sdl client should show the national legends in the nation dialog. > > And also the nation class information. > It's possible to view legends by middle-clicking on the nation now. Support for nation groups is still missing, though. ~Daniel ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] (PR#39693) [Patch] Unit info label for impossible goto
http://bugs.freeciv.org/Ticket/Display.html?id=39693 > Currently unit info label lists "Turns to target" with very large value (FC_INFINITY) when goto hover is over impossible destination (such as Sea tile for Land unit). This also causes widget resizes. I first found this bug as 'earthquake' effect when mouse was just between legal and illegal tile. Fix attached. - ML diff -Nurd -X.diff_ignore freeciv/client/text.c freeciv/client/text.c --- freeciv/client/text.c 2007-08-25 15:28:38.0 +0300 +++ freeciv/client/text.c 2007-09-09 04:06:58.0 +0300 @@ -699,7 +699,9 @@ if (count > 0 && unit_list_size(hover_units) > 0) { int min, max; -if (!goto_get_turns(&min, &max)) { +if (!is_valid_goto_destination(hover_tile)) { + astr_add_line(&str, _("Unreachable target")); +} else if (!goto_get_turns(&min, &max)) { astr_add_line(&str, _("Turns to target: %d"), min); } else if (min == max) { astr_add_line(&str, _("Turns to target: %d"), max); ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#18384) 2.1.0b1 - Click/drag for units doesn't work (goto)
http://bugs.freeciv.org/Ticket/Display.html?id=18384 > On 07/07/06, Kevin Benton wrote: > > Click/drag for units doesn't work (goto) Which client and OS? Is it still not working with beta6? - ML ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#22484) Freeciv 2.1.0-beta2 client crash: goto/timeout
http://bugs.freeciv.org/Ticket/Display.html?id=22484 > On 05/09/07, Pepeto _ wrote: > > > > crashes when > > the timeout forces a new turn while the player is planing > > a goto move. > > > > Ingo > > > I seems exactly linked with PR#15854. Yes, I used turn changes via timeout to reproduce #15854 with only one machine (one mouse pointer -> cannot move units in one client and have goto hover in another) - ML ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#15854) goto.c:860: Assertion `unit_is_in_focus(punit)' failed
http://bugs.freeciv.org/Ticket/Display.html?id=15854 > On 09/09/07, Marko Lindqvist wrote: > On 05/09/07, Pepeto _ wrote: > > > > It occurs when the server wake up an unit (which was sentried) whereas > > you are selecting a destination for an other unit. > > Patch Ok, it *is* possible to add focus units when goto is active. Replaced assert() with hover cancel. This is all that S2_1 needs. For trunk we may consider adding new goto_map for additional units in focus (if they are allowed to ignore already set waypoints, this should not be hard) - ML diff -Nurd -X.diff_ignore freeciv/client/control.c freeciv/client/control.c --- freeciv/client/control.c 2007-09-02 05:15:11.0 +0300 +++ freeciv/client/control.c 2007-09-09 02:45:11.0 +0300 @@ -255,6 +255,8 @@ **/ void set_unit_focus(struct unit *punit) { + bool focus_changed = FALSE; + if (punit && game.player_ptr && punit->owner != game.player_ptr) { /* Callers should make sure this never happens. */ return; @@ -266,6 +268,7 @@ if (!(get_num_units_in_focus() == 1 && punit == unit_list_get(get_units_in_focus(), 0))) { store_focus(); +focus_changed = TRUE; } /* Redraw the old focus unit (to fix blinking or remove the selection @@ -302,6 +305,10 @@ } } + if (focus_changed) { +set_hover_state(NULL, HOVER_NONE, ACTIVITY_LAST, ORDER_LAST); + } + update_unit_info_label(pfocus_units); update_menus(); } @@ -322,6 +329,12 @@ return; } + if (hover_state != HOVER_NONE) { +/* Can't continue with current goto if set of focus units + * change. Cancel it. */ +set_hover_state(NULL, HOVER_NONE, ACTIVITY_LAST, ORDER_LAST); + } + unit_list_append(pfocus_units, punit); punit->focus_status = FOCUS_AVAIL; refresh_unit_mapcanvas(punit, punit->tile, TRUE, FALSE); ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#15854) goto.c:860: Assertion `unit_is_in_focus(punit)' failed
http://bugs.freeciv.org/Ticket/Display.html?id=15854 > On 05/09/07, Pepeto _ wrote: > > It occurs when the server wake up an unit (which was sentried) whereas > you are selecting a destination for an other unit. Patch > The client crashes every time a enemy unit moves. Most enemy moves are not causing focus changes... Still, how usable goto is if hover is often automatically canceled when you try to setup it? I don't see better solution available soon, so this just replaces crash with hover cancel. - ML diff -Nurd -X.diff_ignore freeciv/client/control.c freeciv/client/control.c --- freeciv/client/control.c 2007-09-02 05:15:11.0 +0300 +++ freeciv/client/control.c 2007-09-09 01:36:49.0 +0300 @@ -255,6 +255,8 @@ **/ void set_unit_focus(struct unit *punit) { + bool focus_changed = FALSE; + if (punit && game.player_ptr && punit->owner != game.player_ptr) { /* Callers should make sure this never happens. */ return; @@ -266,6 +268,7 @@ if (!(get_num_units_in_focus() == 1 && punit == unit_list_get(get_units_in_focus(), 0))) { store_focus(); +focus_changed = TRUE; } /* Redraw the old focus unit (to fix blinking or remove the selection @@ -302,6 +305,10 @@ } } + if (focus_changed) { +set_hover_state(NULL, HOVER_NONE, ACTIVITY_LAST, ORDER_LAST); + } + update_unit_info_label(pfocus_units); update_menus(); } @@ -322,6 +329,13 @@ return; } + /* Can't change list of focused units when there is already + * set of goto lines calculated. */ + assert(hover_state == HOVER_NONE); + if (hover_state != HOVER_NONE) { +return; + } + unit_list_append(pfocus_units, punit); punit->focus_status = FOCUS_AVAIL; refresh_unit_mapcanvas(punit, punit->tile, TRUE, FALSE); ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#39687) Typos in nation rulesets
http://bugs.freeciv.org/Ticket/Display.html?id=39687 > On 9/8/07, Joan Creus <[EMAIL PROTECTED]> wrote: > > http://bugs.freeciv.org/Ticket/Display.html?id=39687 > > > > This transaction appears to have no content > > I think I have found a few typos in several nations; check them out, > particularly two that are in proper nouns, one in khwarezmian and the other > in breton.ruleset > > Joan > They look like good fixes. Except one in purhepecha.ruleset - I do think "devolved into violence" is proper English. ~Daniel ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] (PR#39692) [patch] move my_shutdown_network() call into server_shutdown() function
http://bugs.freeciv.org/Ticket/Display.html?id=39692 > server_shutdown() gets called after my_shutdown_network(), but it still uses network functionality (for send_chat("/quit")). The attached patch moves the my_shutdown_network() call to the end of the server_shutdown() function. Index: client/civclient.c === --- client/civclient.c (revision 13538) +++ client/civclient.c (working copy) @@ -379,7 +379,6 @@ { attribute_flush(); client_remove_all_cli_conn(); - my_shutdown_network(); if (save_options_on_exit) { save_options(); Index: client/connectdlg_common.c === --- client/connectdlg_common.c (revision 13538) +++ client/connectdlg_common.c (working copy) @@ -177,6 +177,7 @@ static void server_shutdown(void) { client_kill_server(TRUE); + my_shutdown_network(); } / Index: client/civclient.c === --- client/civclient.c (revision 13539) +++ client/civclient.c (working copy) @@ -360,7 +360,6 @@ { attribute_flush(); client_remove_all_cli_conn(); - my_shutdown_network(); client_game_free(); Index: client/connectdlg_common.c === --- client/connectdlg_common.c (revision 13539) +++ client/connectdlg_common.c (working copy) @@ -184,6 +184,7 @@ static void server_shutdown(void) { client_kill_server(TRUE); + my_shutdown_network(); } / ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#10775) incomplete helptext
http://bugs.freeciv.org/Ticket/Display.html?id=10775 > Patches s2_1-helptext-v4.diff and s2_1-helptext2.diff committed to S2_1. Version that applies to trunk needed. On 08/09/07, Egor Vyscrebentsov wrote: > > On Sat, 8 Sep 2007 Marko Lindqvist wrote: > > > > insert_allows() a couple of lines later starts (over)writing from the > > beginning of the buffer. > > Yes, wrong params of insert_allows(). Overwrites basic helptext also. Handling of current index inside buffer should be rewritten (in trunk). I don't like how we have to search end of exiting text every time we add new line to helptext. But that's for another ticket. > However, I don't understand why there should be zeroing of buffer > inside insert_allows(). That just sets one byte, and is much safer than trusting that nobody ever changes callers -or adds new one - so that first byte seen by insert_allows() is not zero. > PS. I thought that there was documented rule that we use my_snpritf() > rather than s[n]printf, but I can't find anything now... It should be quite obvious that when we have freeciv variant of some standard function, it should be used. They are there for a reason. - ML ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#15854) goto.c:860: Assertion `unit_is_in_focus(punit)' failed
http://bugs.freeciv.org/Ticket/Display.html?id=15854 > >> Check the top/left corner of the page. If that would have worked, I wouldnt have asked ;) Ingo ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#10775) incomplete helptext
http://bugs.freeciv.org/Ticket/Display.html?id=10775 > On Sat, 8 Sep 2007 Marko Lindqvist wrote: > On 08/09/07, Egor Vyscrebentsov wrote: > > > > PS. Surprisingly, I don't see requirements for governments to be shown > > (at least in gtk client...) Investigating. > > insert_allows() a couple of lines later starts (over)writing from the > beginning of the buffer. Yes, wrong params of insert_allows(). Overwrites basic helptext also. The quickest fix is: - insert_allows(&source, buf, bufsz); + insert_allows(&source, buf + strlen(buf), bufsz - strlen(buf)); However, I don't understand why there should be zeroing of buffer inside insert_allows(). If we allow callers to care about buffer*, function (and its calls) become more clear. *) All helptext_* functions (which are only callers of insert_allows) care about buf. PS. I thought that there was documented rule that we use my_snpritf() rather than s[n]printf, but I can't find anything now... PPS. I don't open new ticket, because this is 'incomplete helptext' bug :) -- Thanks, evyscr Index: client/helpdata.c === --- client/helpdata.c (revision 13508) +++ client/helpdata.c (working copy) @@ -1296,7 +1296,7 @@ /* Effects */ sprintf(buf + strlen(buf), _("Features:\n")); - insert_allows(&source, buf, bufsz); + insert_allows(&source, buf + strlen(buf), bufsz - strlen(buf)); effect_list_iterate(get_req_source_effects(&source), peffect) { Output_type_id output_type = O_LAST; struct unit_class *unitclass = NULL; ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] (PR#39691) [Patch] Rename variables named 'string' from scripting API
http://bugs.freeciv.org/Ticket/Display.html?id=39691 > tolua++ and toluaxx consider word 'string' to mean C++ string class. They produce weird result when there is variables named 'string' around. - ML diff -Nurd -X.diff_ignore freeciv/server/scripting/api_intl.c freeciv/server/scripting/api_intl.c --- freeciv/server/scripting/api_intl.c 2007-08-04 18:36:19.0 +0300 +++ freeciv/server/scripting/api_intl.c 2007-09-08 20:57:24.0 +0300 @@ -19,19 +19,19 @@ #include "api_intl.h" -const char *api_intl__(const char *string) { - return _(string); +const char *api_intl__(const char *untranslated) { + return _(untranslated); } -const char *api_intl_N_(const char *string) { - return N_(string); +const char *api_intl_N_(const char *untranslated) { + return N_(untranslated); } -const char *api_intl_Q_(const char *string) { - return Q_(string); +const char *api_intl_Q_(const char *untranslated) { + return Q_(untranslated); } -const char *api_intl_PL_(const char *string1, const char *string2, int n) { - return PL_(string1, string2, n); +const char *api_intl_PL_(const char *singular, const char *plural, int n) { + return PL_(singular, plural, n); } diff -Nurd -X.diff_ignore freeciv/server/scripting/api_intl.h freeciv/server/scripting/api_intl.h --- freeciv/server/scripting/api_intl.h 2007-08-04 18:36:19.0 +0300 +++ freeciv/server/scripting/api_intl.h 2007-09-08 20:58:16.0 +0300 @@ -14,10 +14,9 @@ #ifndef FC__API_INTL_H #define FC__API_INTL_H -const char *api_intl__(const char *string); -const char *api_intl_N_(const char *string); -const char *api_intl_Q_(const char *string); -const char *api_intl_PL_(const char *string1, const char *string2, int n); - -#endif +const char *api_intl__(const char *untranslated); +const char *api_intl_N_(const char *untranslated); +const char *api_intl_Q_(const char *untranslated); +const char *api_intl_PL_(const char *singular, const char *plural, int n); +#endif /* FC__API_INTL_H */ diff -Nurd -X.diff_ignore freeciv/server/scripting/api.pkg freeciv/server/scripting/api.pkg --- freeciv/server/scripting/api.pkg 2007-09-07 19:24:44.0 +0300 +++ freeciv/server/scripting/api.pkg 2007-09-08 20:57:35.0 +0300 @@ -353,10 +353,10 @@ } /* Intl module. */ -const char *api_intl__ @ _ (const char *string); -const char *api_intl_N_ @ N_ (const char *string); -const char *api_intl_Q_ @ Q_ (const char *string); -const char *api_intl_PL_ @ PL_ (const char *string1, const char *string2, +const char *api_intl__ @ _ (const char *untranslated); +const char *api_intl_N_ @ N_ (const char *untranslated); +const char *api_intl_Q_ @ Q_ (const char *untranslated); +const char *api_intl_PL_ @ PL_ (const char *singular, const char *plural, int n); /* Notify module. */ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] (PR#7294) Proposal: Reducing the bribe-power of Diplomats
http://bugs.freeciv.org/Ticket/Display.html?id=7294 > I would like to resurrect this old but open and valuable ticket. Instead of the rules changes proposed in it, I would like to offer something a bit more radical: The diplomat/spy instead of present abilities gets the unique flag (only one can be built per player), it destroys itself automatically when doing a mission, and gets the ability to take over any enemy unit stacked alone in the open (with no gold cost), or, if targeting a city, to destroy all defensive buildings in a city. This makes the unit powerful, able to turn the tables on a defensive hardpoint, but limited (in number and loss effect), while getting rid of the evil pop-up menu and simplifying the diplomat game logic. - Per ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] (PR#39690) Remove embassy concept
http://bugs.freeciv.org/Ticket/Display.html?id=39690 > This experimental and mostly untested patch removes the embassy concept from the game. Why? The embassy concept has never fitted well into the general game concept. Creating embassies the traditional way (with diplomats) is a tiresome way to achieve the effect, while exchanging embassies in treaties always cried out for a "close embassy" feature. The treaty and embassy fields in the player dialog seemed strange with often duplicated information about contact and embassy status. Removing the concept simplifies the game logic, the game code, and the game UI significantly. Instead, contact now automatically establishes embassy-like relations between players. There is also no contact count down anymore. Discuss :) - Per PS Not sure if the change in the lua code is good. Also not sure what will happen in the civil war case. Index: server/srv_main.c === --- server/srv_main.c (revision 13532) +++ server/srv_main.c (working copy) @@ -466,7 +466,6 @@ struct player_diplstate *state2 = &plr2->diplstates[player_index(plr1)]; state->has_reason_to_cancel = MAX(state->has_reason_to_cancel - 1, 0); - state->contact_turns_left = MAX(state->contact_turns_left - 1, 0); if (state->type == DS_ARMISTICE) { state->turns_left--; @@ -2043,7 +2042,6 @@ && player_number(pplayer) != player_number(pdest)) { pplayer->diplstates[player_index(pdest)].type = DS_TEAM; give_shared_vision(pplayer, pdest); - BV_SET(pplayer->embassy, player_index(pdest)); } } players_iterate_end; } players_iterate_end; Index: server/scripting/api.pkg === --- server/scripting/api.pkg (revision 13532) +++ server/scripting/api.pkg (working copy) @@ -403,14 +403,12 @@ E_MY_DIPLOMAT_BRIBE @ MY_DIPLOMAT_BRIBE, E_DIPLOMATIC_INCIDENT @ DIPLOMATIC_INCIDENT, E_MY_DIPLOMAT_ESCAPE @ MY_DIPLOMAT_ESCAPE, -E_MY_DIPLOMAT_EMBASSY @ MY_DIPLOMAT_EMBASSY, E_MY_DIPLOMAT_FAILED @ MY_DIPLOMAT_FAILED, E_MY_DIPLOMAT_INCITE @ MY_DIPLOMAT_INCITE, E_MY_DIPLOMAT_POISON @ MY_DIPLOMAT_POISON, E_MY_DIPLOMAT_SABOTAGE @ MY_DIPLOMAT_SABOTAGE, E_MY_DIPLOMAT_THEFT @ MY_DIPLOMAT_THEFT, E_ENEMY_DIPLOMAT_BRIBE @ ENEMY_DIPLOMAT_BRIBE, -E_ENEMY_DIPLOMAT_EMBASSY @ ENEMY_DIPLOMAT_EMBASSY, E_ENEMY_DIPLOMAT_FAILED @ ENEMY_DIPLOMAT_FAILED, E_ENEMY_DIPLOMAT_INCITE @ ENEMY_DIPLOMAT_INCITE, E_ENEMY_DIPLOMAT_POISON @ ENEMY_DIPLOMAT_POISON, @@ -465,7 +463,6 @@ E_WONDER_STOPPED @ WONDER_STOPPED, E_WONDER_WILL_BE_BUILT @ WONDER_WILL_BE_BUILT, E_DIPLOMACY @ DIPLOMACY, -E_TREATY_EMBASSY @ TREATY_EMBASSY, E_BAD_COMMAND @ BAD_COMMAND, E_SETTING @ SETTING, E_CHAT_MSG @ CHAT_MSG, Index: server/edithand.c === --- server/edithand.c (revision 13532) +++ server/edithand.c (working copy) @@ -373,8 +373,6 @@ for (i = 0; i < MAX_NUM_PLAYERS + MAX_NUM_BARBARIANS; i++) { pplayer->diplstates[i].type = packet->diplstates[i].type; pplayer->diplstates[i].turns_left = packet->diplstates[i].turns_left; -pplayer->diplstates[i].contact_turns_left - = packet->diplstates[i].contact_turns_left; pplayer->diplstates[i].has_reason_to_cancel = packet->diplstates[i].has_reason_to_cancel; } Index: server/diplhand.c === --- server/diplhand.c (revision 13532) +++ server/diplhand.c (working copy) @@ -145,13 +145,6 @@ if (pclause->from == pplayer) { switch(pclause->type) { - case CLAUSE_EMBASSY: - if (player_has_embassy(pother, pplayer)) { -freelog(LOG_ERROR, "%s tried to give embassy to %s, who already " -"has an embassy", pplayer->name, pother->name); -return; - } - break; case CLAUSE_ADVANCE: if (!player_invention_is_ready(pother, pclause->value)) { /* It is impossible to give a technology to a civilization that @@ -356,15 +349,6 @@ pgiver->diplstates[player_index(pdest)].type; switch (pclause->type) { - case CLAUSE_EMBASSY: -establish_embassy(pdest, pgiver); /* sic */ -notify_player(pgiver, NULL, E_TREATY_SHARED_VISION, - _("You gave an embassy to %s."), - pdest->name); -notify_player(pdest, NULL, E_TREATY_SHARED_VISION, - _("%s allowed you to create an embassy!"), - pgiver->name); -break; case CLAUSE_ADVANCE: /* It is possible that two players open the diplomacy dialog * and try to give us the same tech at the same time. This @@ -544,18 +528,6 @@ } } -/ - C
Re: [Freeciv-Dev] (PR#10775) incomplete helptext
http://bugs.freeciv.org/Ticket/Display.html?id=10775 > On 08/09/07, Egor Vyscrebentsov wrote: > > PS. Surprisingly, I don't see requirements for governments to be shown > (at least in gtk client...) Investigating. insert_allows() a couple of lines later starts (over)writing from the beginning of the buffer. - ML ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#10775) incomplete helptext
http://bugs.freeciv.org/Ticket/Display.html?id=10775 > On Fri, 7 Sep 2007 Marko Lindqvist wrote: > On 07/09/07, Egor Vyscrebentsov wrote: > > > > On Thu, 6 Sep 2007 Marko Lindqvist wrote: > > > > > On 06/09/07, Egor Vyscrebentsov wrote: > > > > > > > Double "\n\n" at the end of every req line looks not good though. > > > > I suggest to remove one. (At trunk, at least.) > > > > > > At trunk: definitely. Not sure about S2_1. > > > > 9 lines change. I think that they look too not good to be kept. > > They are problem only when there are multiple requirements, which is > rare situation. But yes, we have to touch many help dialog strings > before we can release 2.1.0, so translators need to check them anyway. So done for S2_1. > > > Should add one after whole requirement block (unless it is empty). > > > > > > > _This_ patch is ready for inclusion into S2_1, however. > > > > > > We have to decide what to do with that outcommented block. Either we > > > use it, or we remove it (in which case that meaningless has_req > > > variable must go also). > > > > Sure. I prefer first variant. > > Ok, will you update the patch? Attached. Removed second "\n" symbols, used "Requires: Nothing" when no reqs found. PS. Surprisingly, I don't see requirements for governments to be shown (at least in gtk client...) Investigating. -- Thanks, evyscr Index: client/helpdata.c === --- client/helpdata.c (revision 13508) +++ client/helpdata.c (working copy) @@ -163,51 +163,51 @@ case REQ_LAST: break; case REQ_TECH: -cat_snprintf(buf, bufsz, _("Requires the %s technology.\n\n"), +cat_snprintf(buf, bufsz, _("Requires the %s technology.\n"), advance_name_for_player(game.player_ptr, req->source.value.tech)); return; case REQ_GOV: -cat_snprintf(buf, bufsz, _("Requires the %s government.\n\n"), +cat_snprintf(buf, bufsz, _("Requires the %s government.\n"), government_name_translation(req->source.value.gov)); return; case REQ_BUILDING: -cat_snprintf(buf, bufsz, _("Requires the %s building.\n\n"), +cat_snprintf(buf, bufsz, _("Requires the %s building.\n"), improvement_name_translation(req->source.value.building)); return; case REQ_SPECIAL: -cat_snprintf(buf, bufsz, _("Requires the %s terrain special.\n\n"), +cat_snprintf(buf, bufsz, _("Requires the %s terrain special.\n"), special_name_translation(req->source.value.special)); return; case REQ_TERRAIN: -cat_snprintf(buf, bufsz, _("Requires the %s terrain.\n\n"), +cat_snprintf(buf, bufsz, _("Requires the %s terrain.\n"), terrain_name_translation(req->source.value.terrain)); return; case REQ_NATION: -cat_snprintf(buf, bufsz, _("Requires the %s nation.\n\n"), +cat_snprintf(buf, bufsz, _("Requires the %s nation.\n"), nation_name_translation(req->source.value.nation)); return; case REQ_UNITTYPE: -cat_snprintf(buf, bufsz, _("Only applies to %s units.\n\n"), +cat_snprintf(buf, bufsz, _("Only applies to %s units.\n"), utype_name_translation(req->source.value.unittype)); return; case REQ_UNITFLAG: -cat_snprintf(buf, bufsz, _("Only applies to %s units.\n\n"), +cat_snprintf(buf, bufsz, _("Only applies to %s units.\n"), unit_flag_rule_name(req->source.value.unitflag)); return; case REQ_UNITCLASS: -cat_snprintf(buf, bufsz, _("Only applies to %s units.\n\n"), +cat_snprintf(buf, bufsz, _("Only applies to %s units.\n"), uclass_name_translation(req->source.value.unitclass)); return; case REQ_OUTPUTTYPE: -cat_snprintf(buf, bufsz, _("Applies only to %s.\n\n"), +cat_snprintf(buf, bufsz, _("Applies only to %s.\n"), get_output_name(req->source.value.outputtype)); return; case REQ_SPECIALIST: -cat_snprintf(buf, bufsz, _("Applies only to %s.\n\n"), +cat_snprintf(buf, bufsz, _("Applies only to %s.\n"), _(get_specialist(req->source.value.specialist)->name)); return; case REQ_MINSIZE: -cat_snprintf(buf, bufsz, _("Requires a minimum size of %d.\n\n"), +cat_snprintf(buf, bufsz, _("Requires a minimum size of %d.\n"), req->source.value.minsize); return; } @@ -645,6 +645,7 @@ .type = REQ_BUILDING, .value = {.building = which} }; + bool has_req = FALSE; assert(buf); buf[0] = '\0'; @@ -655,11 +656,22 @@ } imp = improvement_by_number(which); - + if (imp->helptext && imp->helptext[0] != '\0') { cat_snprintf(buf, bufsz, "%s\n\n", _(imp->helptext)); } + requirement_vector_iterate(&imp->reqs, preq) { +insert_requirement(preq, buf, bufsz); +has_req = TRUE; + } requirement_vector_iterate_end; + + if (has_req) { +cat_snprintf(buf, bufsz, "\n"); + } else { +cat_snprintf(buf, bufsz, _("Requires: Nothing\n\n")); + } + if (tech_exists(improvement_by_number(which)->obsolete_by)) { cat_snprintf(buf, bufsz, _("* The discovery of %
[Freeciv-Dev] (PR#15854) goto.c:860: Assertion `unit_is_in_focus(punit)' failed
http://bugs.freeciv.org/Ticket/Display.html?id=15854 > > [pepeto - Do 06. Sep 2007, 11:40:30]: > > > PS: Is the guest web login for the bug reporting page broken? > > Check the top/left corner of the page. > Guest login doesn't work for mee, too (with password from the corner). ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] (PR#39689) Correction in civ2 governments
http://bugs.freeciv.org/Ticket/Display.html?id=39689 > This transaction appears to have no content I'm not sure it is necessary at all, but the Fundamentalism description in data/civ2/governments.ruleset has a grammar problem. Since it is there, we might as well fix it. I'm not sure it is necessary at all, but the Fundamentalism description in data/civ2/governments.ruleset has a grammar problem. Since it is there, we might as well fix it. Index: governments.ruleset === --- governments.ruleset (revision 13532) +++ governments.ruleset (working copy) @@ -153,8 +153,8 @@ devoted to their beliefs, and are usually willing to die to\ preserve them.\ \n\n\ -Improvement that normally convert unhappy citizens to content\ - citizens, produces `tithes' (gold) equivalent to the number\ +Improvements that normally convert unhappy citizens to content\ + citizens, produce `tithes' (gold) equivalent to the number\ of people they would convert, and require no maintenance.\ ") ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] (PR#39688) Typo in galleon description
http://bugs.freeciv.org/Ticket/Display.html?id=39688 > This transaction appears to have no content The description of the galleon unit in data/default/units.ruleset has a typo, I believe: Joan The description of the galleon unit in data/default/units.ruleset has a typo, I believe:Joan Index: units.ruleset === --- units.ruleset (revision 13524) +++ units.ruleset (working copy) @@ -1372,7 +1372,7 @@ roles = "Ferryboat", "BarbarianBoat" helptext = _("\ The Galleon is a pure transport ship and cannot\ - attack other ships, though is may still defend\ + attack other ships, though it may still defend\ itself when attacked.\ ") ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] (PR#39687) Typos in nation rulesets
http://bugs.freeciv.org/Ticket/Display.html?id=39687 > This transaction appears to have no content I think I have found a few typos in several nations; check them out, particularly two that are in proper nouns, one in khwarezmian and the other in breton.ruleset Joan I think I have found a few typos in several nations; check them out, particularly two that are in proper nouns, one in khwarezmian and the other in breton.rulesetJoan Index: phoenician.ruleset === --- phoenician.ruleset (revision 13524) +++ phoenician.ruleset (working copy) @@ -7,9 +7,9 @@ coastal regions of Lebanon and Syria. They spoke a Canaanite language\ related to Hebrew and were famed mariners. Their alphabet served as the\ source of the Greek alphabet, and from there evolved into the Etruscan\ - and Latin alphabets as well. The Greeks and Romans new them for their\ + and Latin alphabets as well. The Greeks and Romans knew them for their\ manufacture of purple dye from the myrex shell, which gave them their\ - Greek and Latin names. They refered to themselves a Kan'ani and thier\ + Greek and Latin names. They refered to themselves a Kan'ani and their\ Punic (Carthaginian) descendents in St. Augustine's day called themselves\ Chanani.") leader= Index: chola.ruleset === --- chola.ruleset (revision 13524) +++ chola.ruleset (working copy) @@ -4,7 +4,7 @@ plural=_("?plural:Cholas") groups="Asian", "Ancient" -legend=_("The Cholas were a Tamil dynasty in centered in southern India and\ +legend=_("The Cholas were a Tamil dynasty centered in southern India and\ were rare in their level of influence in northern India. They began as a\ tributary state to the Pallavas, but in the 9th century their power began\ to grow. During the 11th century, they lead expeditions against other\ Index: laotian.ruleset === --- laotian.ruleset (revision 13524) +++ laotian.ruleset (working copy) @@ -9,7 +9,7 @@ century, Laos became part of French Indochina.\ French rule ended with independence in 1946 followed\ by 30 years of civil war. In 1975 the communist Pathet\ - Lao established strict solicalist regime. However,\ + Lao established a strict socialist regime. However,\ in 1986 the liberalization and a gradual return to\ private enterpise started.") Index: khwarezmian.ruleset === --- khwarezmian.ruleset (revision 13524) +++ khwarezmian.ruleset (working copy) @@ -9,8 +9,8 @@ controlling portions of the Silk Road. It was loosely controlled as a\ satrapy under the Achaemenid and Sassanid Persian dynasties and was mythic\ homeland of Zarathustra, the founder of Zoroastrianism. Following the\ - introduction of Islam, Khwarezm tended to be devided into two seperate\ - kingdoms, but was united under the Turkic Anushtegihidy dynasty, which\ + introduction of Islam, Khwarezm tended to be divided into two separate\ + kingdoms, but was united under the Turkic Anushtiginid dynasty, which\ lasted from 1097 until Chinggis Khan conquered it in 1231.") leader= Index: kurd.ruleset === --- kurd.ruleset (revision 13524) +++ kurd.ruleset (working copy) @@ -2,7 +2,7 @@ name=_("Kurdish") plural=_("?plural:Kurds") -groups=_("Asian"), _("Medieval") +groups="Asian", "Medieval" legend=_("The Kurds are a distinct ethno-linguistic group speaking an\ Indo-Aryan language. Their traditional homeland Kurdistan is situated in\ northern Middle East and partitioned between Iraq, Turkey, Syria, and\ Index: breton.ruleset === --- breton.ruleset (revision 13524) +++ breton.ruleset (working copy) @@ -3,8 +3,8 @@ name=_("Breton") plural=_("?plural:Bretons") groups="Medieval", "European" -legend=_("Known to the Romans as Amorica, Brittany has been Celtic speaking\ - for many centuries before Britons arrive in the peninsula a mercenaries,\ +legend=_("Known to the Romans as Armorica, Brittany had been Celtic speaking\ + for many centuries before Britons arrived in the peninsula as mercenaries,\ colonists and refugees in response to the chaos in Gaul and the invasion\ of Britain by Germanic tribes in the fifth century CE. Over the centuries,\ use of the Breton language has been pushed towards the west of the\ Index: kongo.ruleset === --- kongo.ruleset (revision 13524) +++ kongo.ruleset (working copy) @@ -6,7 +6,7 @@ legend=_("This Kingdom, lasting from roughly 1400 CE until the late 19th\ century, existed in the present-day countries of Angola and the Democratic\ - Republic of the Congo. Soon after its formation, Portuguese exlporers,\ + Republic of the Congo. Soon after its formation, Portug
[Freeciv-Dev] (PR#39686) [Bug] Unit pointer used after move_unit()
http://bugs.freeciv.org/Ticket/Display.html?id=39686 > It has been bad idea to remove return value from move_unit() in trunk. Even if it was not used by callers, it should be. Now some callers are ready to segfault when ever moving unit dies due to autoattack or by entering barbarian hut (or some other reason?). - ML ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] (PR#39685) [Bug] player_find_????_by_id() broken
http://bugs.freeciv.org/Ticket/Display.html?id=39685 > Comment says that pplayer can be NULL to check if city/unit is in game at all. But that will return TRUE only for units which have no owner (owner also NULL). I guess NULL handling has been added to player_find__by_id() to replace removed find__by_id(). If so, this can explain many trunk problems. - ML ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] (PR#39684) Update to catalan.ruleset
http://bugs.freeciv.org/Ticket/Display.html?id=39684 > This transaction appears to have no content I have updated the catalan.ruleset, since the current legend is way too uninformative. I have also added a couple (dead) leaders, added a few cities, corrected some typos in city names, and added several terrain tags to cities. In order to write the legend, I have refreshed my history lessons with the following articles from Wikipedia: http://en.wikipedia.org/wiki/Crown_of_Aragon http://en.wikipedia.org/wiki/War_of_the_Spanish_Succession Joan I have updated the catalan.ruleset, since the current legend is way too uninformative. I have also added a couple (dead) leaders, added a few cities, corrected some typos in city names, and added several terrain tags to cities. In order to write the legend, I have refreshed my history lessons with the following articles from Wikipedia:http://en.wikipedia.org/wiki/Crown_of_Aragon http://en.wikipedia.org/wiki/War_of_the_Spanish_SuccessionJoan Index: catalan.ruleset === --- catalan.ruleset (revision 13524) +++ catalan.ruleset (working copy) @@ -3,17 +3,25 @@ name=_("Catalan") plural=_("?plural:Catalans") groups="Medieval", "European" -legend=_("Catalunya (aka Catalonia in English) is the north-eastern-most\ - coastal region of Spain near the southern foot of the Pyrenees.") +legend=_("During the Middle Ages, Catalan kings conquered and presided over several \ +kingdoms on the shores of the Mediterranean Sea, from the Iberian peninsula to \ +parts of Italy and Greece. This confederation/empire became a major \ +naval and trading power in the Mediterranean area. Catalans kept their self-rule \ +after a dynastic union with the neighboring kingdom of Castile, and sided with \ +England and Austria against France and Castile in the Spanish Succession War. \ +In 1713, England signed the Treaty of Utrecht and dropped out of the alliance, and \ +Catalans were finally defeated in 1714, losing their national rights as a result.") leader= "Guifré el Pilós", "Ramon Berenguer IV", "Jaume I", "Pere II", + "Pau Claris", + "Francesc Macià", "Lluis Companys", "Josep Tarradellas" leader_sex="Male", "Male", "Male", "Male", - "Male", "Male" + "Male", "Male", "Male", "Male" flag="catalan" flag_alt = "-" city_style = "Classical" @@ -28,6 +36,7 @@ "Fundamentalism", _("Arquebisbe"), _("Gran Bruixa") } + init_techs="" init_buildings="" @@ -39,22 +48,22 @@ ; but rather to the "Països Catalans" of modern ethnolinguistic ; nationalists. cities = - "Barcelona", "Tarragona", "Lleida", "Girona", "Perpinyà", "Valencia", + "Barcelona", "Tarragona", "Lleida (!ocean)", "Girona", "Perpinyà", "València", "Tolosa", "Ripoll", "Vic", "La Seu d'Urgell", "Cardona", "Tortosa", "Montserrat (hills)", "Poblet", "Santes Creus", "Vallbona de les Monges", "Balaguer", "Manresa", "Terrassa", - "Sabadell", "Palma de Mallorca", "Eivissa", "Alacant", "Elx", + "Sabadell", "Palma de Mallorca (ocean)", "Eivissa", "Alacant", "Elx", "Castelló de la Plana", "Montblanc (hills)", "Igualada", "Cervera", "Berga", "Dénia", "Reus", "Granollers", "Mataró", "Figueres", "Olot", - "Badalona", "Tàrrega", "Amposta", "El Bruc", "Valls", - "Vilafranca del Penedés", "Manacor", "Alcúdia", "Sóller", "Artà", - "Llucmajor", "Felanitx", "Andratx", "Ciutadella", "Penyiscola", - "Sitges", "Vilanova i la Geltrú", "Viella", "L'Alguer", "Perelló", + "Badalona", "Tàrrega", "Amposta", "El Bruc", "Valls", "Sant Fruitós", + "Vilafranca del Penedès", "Manacor", "Alcúdia", "Sóller", "Artà", + "Llucmajor", "Felanitx", "Andratx", "Ciutadella", "Penyíscola", "Guardiola", + "Sitges", "Vilanova i la Geltrú", "Viella (hills)", "L'Alguer", "Perelló", "Torelló", "Sant Cugat", "Portbou (ocean)", "Palafrugell", "Manlleu", "Sallent", "Puigcerdà", "Bellver", "Sant Boi de Llobregat", "Vandellós", "Cornellà", "Tremp", "Palamós", "El Vendrell", "Sant Feliu de Guíxols", "Sant Celoni", "Martorell", "L'Hospitalet", - "Mollet del Vallès", "Banyoles", "Blanes", "Lloret de mar (ocean)", + "Mollet del Vallès", "Banyoles", "Blanes (ocean)", "Lloret de mar (ocean)", "Malgrat de mar (ocean)", "Canet de mar (ocean)", "Molins de Rei", - "Pons", "Súria", "Llívia", "La Bisbal d'Empurdà", "Prada", "Elna", + "Pons", "Súria", "Llívia", "La Bisbal d'Empordà", "Prada", "Elna", "Ceret", "Cadaqués", "Begur", "Olesa de Montserrat (hills)" ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] (PR#39683) [Bug] city_production_has_flag() ignores actual flag parameter
http://bugs.freeciv.org/Ticket/Display.html?id=39683 > Always checks against IF_GOLD. Trunk only. - ML ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] (PR#39682) [Patch] Notice about not-enabled authentication
http://bugs.freeciv.org/Ticket/Display.html?id=39682 > It can be confusing that even when you enable authentication at configure time with --enable-auth, civserver still runs without authentication (by default). Attached patch prints notice when auth-capable civserver is started auth disabled. - ML diff -Nurd -X.diff_ignore freeciv/server/srv_main.c freeciv/server/srv_main.c --- freeciv/server/srv_main.c 2007-09-06 17:21:33.0 +0300 +++ freeciv/server/srv_main.c 2007-09-08 15:21:26.0 +0300 @@ -927,7 +927,10 @@ server_game_free(); diplhand_free(); #ifdef HAVE_AUTH - auth_free(); + if (srvarg.auth_enabled) { +/* If auth has been initialized */ +auth_free(); + } #endif /* HAVE_AUTH */ stdinhand_free(); close_connections_and_socket(); @@ -1779,6 +1782,12 @@ **/ void srv_main(void) { +#ifdef HAVE_AUTH + if (!srvarg.auth_enabled) { +con_write(C_COMMENT, _("This civserver program has player authentication support, but it's currently not in use.")); + } +#endif /* HAVE_AUTH */ + /* make sure it's initialized */ if (!has_been_srv_init) { srv_init(); ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#39414) tolua, tolua++, toluaxx
http://bugs.freeciv.org/Ticket/Display.html?id=39414 > I have now managed to start and test some of the scenario using lua-5.1 + toluaxx. Toluaxx is buggy. I had to make several changes to api.pkg to work around toluaxx problems that caused it to produce non-compilable api_gen.c. Now it compiles without errors, but with lots of warnings. Of course, fact that it compiles does not prove that it's correct. Same problems were present both in toluaxx in svn and latest one from toluaxx version control. I also tried to modify our version of tolua to work with lua-5.1. This tolua still fails to produce complete api_gen.c. There is new, lua 5.1 compatible, (beta?) version of tolua available. I'm currently trying to get this to work. At the moment, it also seems to produce incorrect api_gen.c. On 10/08/07, Per I. Mathisen wrote: > > If I had the time and desire to hack on this part of the code again, I > would look into using lua directly instead of going through tolua. Vasco > said it saves a lot of work, but considering the mess it makes, both in > the source and to our build process, I think it should at least be > considered seriously. If we had used all that time that has gone to these failed attempts with tolua/tolua++/toluaxx, to manually write equivalent of api_gen.c instead... - ML ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev