[Freeciv-commits] r29483 - in /branches/S2_6: configure.ac doc/README.packaging tools/civmanual.c
Author: cazfi Date: Thu Aug 13 05:23:05 2015 New Revision: 29483 URL: http://svn.gna.org/viewcvs/freeciv?rev=29483view=rev Log: Replaced configure option --with-freeciv-manual with --enable-freeciv-manual that can be used also to control the kind of output freeciv-manual will produce. See patch #6214 Modified: branches/S2_6/configure.ac branches/S2_6/doc/README.packaging branches/S2_6/tools/civmanual.c Modified: branches/S2_6/configure.ac URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/configure.ac?rev=29483r1=29482r2=29483view=diff == --- branches/S2_6/configure.ac (original) +++ branches/S2_6/configure.ac Thu Aug 13 05:23:05 2015 @@ -807,11 +807,20 @@ AM_CONDITIONAL([CLIENT], [test x$client = xyes]) -AC_ARG_WITH([freeciv-manual], - AS_HELP_STRING([--without-freeciv-manual], [do not build freeciv-manual]), - [fcmanual=${withval}], [fcmanual=yes]) - -AM_CONDITIONAL([FCMANUAL], [test x$fcmanual = xyes]) +AC_ARG_ENABLE([freeciv-manual], + AS_HELP_STRING([--enable-freeciv-manual=no/yes/wiki/html], [build freeciv-manual [wiki]]), +[case ${enableval} in + yes|wiki) fcmanual=wiki ;; + no) fcmanual=no ;; + html) fcmanual=html ;; + *) AC_MSG_ERROR([bad value ${enableval} for --enable-freeciv-manual]) ;; +esac], [fcmanual=wiki]) + +AM_CONDITIONAL([FCMANUAL], [test x$fcmanual != xno]) + +if test x$fcmanual = xhtml ; then + AC_DEFINE([MANUAL_USE_HTML], [1], [Build freeciv-manual with html formatting]) +fi dnl freeciv-modpack checks AC_ARG_ENABLE([fcmp], Modified: branches/S2_6/doc/README.packaging URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/doc/README.packaging?rev=29483r1=29482r2=29483view=diff == --- branches/S2_6/doc/README.packaging (original) +++ branches/S2_6/doc/README.packaging Thu Aug 13 05:23:05 2015 @@ -41,6 +41,11 @@ SDL1.2-mixer * Server now saves its readline history to file ~/.freeciv/freeciv-server_history instead of ~/.freeciv-server_history +* Configure option --with-freeciv-manual / --without-freeciv-manual has + been replaced with --enable-freeciv-manual / --disable-freeciv-manual + that can take also value --enable-freeciv-manual=html to make + freeciv-manual that produces manuals with alternative formatting, + default still being wiki formatting. -- Compatibility of modified versions Modified: branches/S2_6/tools/civmanual.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/tools/civmanual.c?rev=29483r1=29482r2=29483view=diff == --- branches/S2_6/tools/civmanual.c (original) +++ branches/S2_6/tools/civmanual.c Thu Aug 13 05:23:05 2015 @@ -80,7 +80,7 @@ }; /* This formats the manual for an HTML wiki. */ -#ifdef USE_HTML +#ifdef MANUAL_USE_HTML #define HEADER htmlheadlink rel=\stylesheet\ type=\text/css\ \ href=\manual.css\/meta http-equiv=\Content-Type\ \ content=\text/html; charset=UTF-8\//headbody\n\n @@ -90,7 +90,7 @@ #define IMAGE_END .png\ #define SEPARATOR #define TAIL /body/html -#else +#else /* MANUAL_USE_HTML */ #define HEADER #define SECTION_BEGIN === #define SECTION_END === @@ -98,7 +98,7 @@ #define IMAGE_END .png]] #define SEPARATOR \n\n #define TAIL -#endif +#endif /* MANUAL_USE_HTML */ void insert_client_build_info(char *outbuf, size_t outlen); ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r29482 - in /trunk: configure.ac tools/civmanual.c
Author: cazfi Date: Thu Aug 13 05:22:57 2015 New Revision: 29482 URL: http://svn.gna.org/viewcvs/freeciv?rev=29482view=rev Log: Replaced configure option --with-freeciv-manual with --enable-freeciv-manual that can be used also to control the kind of output freeciv-manual will produce. See patch #6214 Modified: trunk/configure.ac trunk/tools/civmanual.c Modified: trunk/configure.ac URL: http://svn.gna.org/viewcvs/freeciv/trunk/configure.ac?rev=29482r1=29481r2=29482view=diff == --- trunk/configure.ac (original) +++ trunk/configure.ac Thu Aug 13 05:22:57 2015 @@ -827,11 +827,20 @@ AM_CONDITIONAL([CLIENT], [test x$client = xyes]) -AC_ARG_WITH([freeciv-manual], - AS_HELP_STRING([--without-freeciv-manual], [do not build freeciv-manual]), - [fcmanual=${withval}], [fcmanual=yes]) - -AM_CONDITIONAL([FCMANUAL], [test x$fcmanual = xyes]) +AC_ARG_ENABLE([freeciv-manual], + AS_HELP_STRING([--enable-freeciv-manual=no/yes/wiki/html], [build freeciv-manual [wiki]]), +[case ${enableval} in + yes|wiki) fcmanual=wiki ;; + no) fcmanual=no ;; + html) fcmanual=html ;; + *) AC_MSG_ERROR([bad value ${enableval} for --enable-freeciv-manual]) ;; +esac], [fcmanual=wiki]) + +AM_CONDITIONAL([FCMANUAL], [test x$fcmanual != xno]) + +if test x$fcmanual = xhtml ; then + AC_DEFINE([MANUAL_USE_HTML], [1], [Build freeciv-manual with html formatting]) +fi dnl freeciv-modpack checks AC_ARG_ENABLE([fcmp], Modified: trunk/tools/civmanual.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/tools/civmanual.c?rev=29482r1=29481r2=29482view=diff == --- trunk/tools/civmanual.c (original) +++ trunk/tools/civmanual.c Thu Aug 13 05:22:57 2015 @@ -82,7 +82,7 @@ }; /* This formats the manual for an HTML wiki. */ -#ifdef USE_HTML +#ifdef MANUAL_USE_HTML #define HEADER htmlheadlink rel=\stylesheet\ type=\text/css\ \ href=\manual.css\/meta http-equiv=\Content-Type\ \ content=\text/html; charset=UTF-8\//headbody\n\n @@ -92,7 +92,7 @@ #define IMAGE_END .png\ #define SEPARATOR #define TAIL /body/html -#else +#else /* MANUAL_USE_HTML */ #define HEADER #define SECTION_BEGIN === #define SECTION_END === @@ -100,7 +100,7 @@ #define IMAGE_END .png]] #define SEPARATOR \n\n #define TAIL -#endif +#endif /* MANUAL_USE_HTML */ void insert_client_build_info(char *outbuf, size_t outlen); ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r29472 - in /trunk: ./ client/ client/gui-gtk-2.0/ client/gui-gtk-3.0/ client/gui-qt/ common/ data/ server/
Author: sveinung Date: Wed Aug 12 12:30:26 2015 New Revision: 29472 URL: http://svn.gna.org/viewcvs/freeciv?rev=29472view=rev Log: orders system: replace ORDER_BUILD_CITY with ORDER_PERFORM_ACTION Offer Go and... menu items for both join and found to give the player full control. A smart menu item may choose another action than the one the player intended. This will upset the player. A smart alternative can come later. See patch #6220 Modified: trunk/client/control.c trunk/client/gui-gtk-2.0/menu.c trunk/client/gui-gtk-3.0/menu.c trunk/client/gui-qt/menu.cpp trunk/client/gui-qt/menu.h trunk/common/unit.h trunk/data/gtk_menus.xml trunk/fc_version trunk/server/savecompat.c trunk/server/savegame.c trunk/server/savegame2.c trunk/server/savegame3.c trunk/server/unithand.c trunk/server/unittools.c Modified: trunk/client/control.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/control.c?rev=29472r1=29471r2=29472view=diff == --- trunk/client/control.c (original) +++ trunk/client/control.c Wed Aug 12 12:30:26 2015 @@ -271,7 +271,7 @@ Enter the given hover state. activity = The connect activity (ACTIVITY_IRRIGATE, etc.) -order = The last order (ORDER_BUILD_CITY, ORDER_LAST, etc.) +order = The last order (ORDER_PERFORM_ACTION, ORDER_LAST, etc.) **/ void set_hover_state(struct unit_list *punits, enum cursor_hover_state state, enum unit_activity activity, Modified: trunk/client/gui-gtk-2.0/menu.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-2.0/menu.c?rev=29472r1=29471r2=29472view=diff == --- trunk/client/gui-gtk-2.0/menu.c (original) +++ trunk/client/gui-gtk-2.0/menu.c Wed Aug 12 12:30:26 2015 @@ -1064,7 +1064,15 @@ */ static void go_build_city_callback(GtkAction *action, gpointer data) { - request_unit_goto(ORDER_BUILD_CITY, ACTION_COUNT); + request_unit_goto(ORDER_PERFORM_ACTION, ACTION_FOUND_CITY); +} + +/ + Action GO_JOIN_CITY callback. +*/ +static void go_join_city_callback(GtkAction *action, gpointer data) +{ + request_unit_goto(ORDER_PERFORM_ACTION, ACTION_JOIN_CITY); } / @@ -1682,6 +1690,8 @@ b, NULL, G_CALLBACK(build_city_callback)}, {GO_BUILD_CITY, NULL, _(Go _to and Build city), Shiftb, NULL, G_CALLBACK(go_build_city_callback)}, + {GO_JOIN_CITY, NULL, _(Go to and Join city), + Shiftj, NULL, G_CALLBACK(go_join_city_callback)}, {AUTO_SETTLER, NULL, _(_Auto Settler), a, NULL, G_CALLBACK(auto_settle_callback)}, @@ -2184,6 +2194,8 @@ || can_units_do(punits, unit_can_help_build_wonder_here))); menus_set_sensitive(unit_group, GO_BUILD_CITY, units_contain_cityfounder(punits)); + menus_set_sensitive(unit_group, GO_JOIN_CITY, + units_can_do_action(punits, ACTION_JOIN_CITY, TRUE)); menus_set_sensitive(unit_group, BUILD_ROAD, (can_units_do_any_road(punits) || can_units_do(punits, Modified: trunk/client/gui-gtk-3.0/menu.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/menu.c?rev=29472r1=29471r2=29472view=diff == --- trunk/client/gui-gtk-3.0/menu.c (original) +++ trunk/client/gui-gtk-3.0/menu.c Wed Aug 12 12:30:26 2015 @@ -1064,7 +1064,15 @@ */ static void go_build_city_callback(GtkAction *action, gpointer data) { - request_unit_goto(ORDER_BUILD_CITY, ACTION_COUNT); + request_unit_goto(ORDER_PERFORM_ACTION, ACTION_FOUND_CITY); +} + +/ + Action GO_JOIN_CITY callback. +*/ +static void go_join_city_callback(GtkAction *action, gpointer data) +{ + request_unit_goto(ORDER_PERFORM_ACTION, ACTION_JOIN_CITY); } / @@ -1683,6 +1691,8 @@ b, NULL, G_CALLBACK(build_city_callback)}, {GO_BUILD_CITY, NULL, _(Go _to and Build city), Shiftb, NULL, G_CALLBACK(go_build_city_callback)}, + {GO_JOIN_CITY, NULL, _(Go to and Join city), + Shiftj, NULL, G_CALLBACK(go_join_city_callback)}, {AUTO_SETTLER, NULL, _(_Auto Settler), a, NULL, G_CALLBACK(auto_settle_callback)}, @@ -2185,6 +2195,8 @@ || can_units_do(punits,
[Freeciv-commits] r29471 - in /trunk/server: savecompat.c unithand.c
Author: sveinung Date: Wed Aug 12 12:29:56 2015 New Revision: 29471 URL: http://svn.gna.org/viewcvs/freeciv?rev=29471view=rev Log: orders system: support the Join City action See patch #6219 Modified: trunk/server/savecompat.c trunk/server/unithand.c Modified: trunk/server/savecompat.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/savecompat.c?rev=29471r1=29470r2=29471view=diff == --- trunk/server/savecompat.c (original) +++ trunk/server/savecompat.c Wed Aug 12 12:29:56 2015 @@ -1059,9 +1059,9 @@ * possible for rulesets to allow joining foreign cities before 3.0. * This means that a converted build city order only can be a Join * City order if it targets a domestic city. */ - /* TODO: Support ACTION_JOIN_CITY orders. */ - return ACTION_COUNT; + return ACTION_JOIN_CITY; } else { + /* Assume that the intention was to found a new city. */ return ACTION_FOUND_CITY; } case ORDER_OLD_BUILD_WONDER: Modified: trunk/server/unithand.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/unithand.c?rev=29471r1=29470r2=29471view=diff == --- trunk/server/unithand.c (original) +++ trunk/server/unithand.c Wed Aug 12 12:29:56 2015 @@ -3645,6 +3645,7 @@ case ACTION_ESTABLISH_EMBASSY: case ACTION_TRADE_ROUTE: case ACTION_HELP_WONDER: + case ACTION_JOIN_CITY: /* Don't validate that the target tile really contains a city or * that the actor player's map think the target tile has one. * The player may target a city from its player map that isn't ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r29468 - in /trunk: ./ common/ server/
Author: sveinung Date: Wed Aug 12 12:28:51 2015 New Revision: 29468 URL: http://svn.gna.org/viewcvs/freeciv?rev=29468view=rev Log: orders system: replace ORDER_TRADE_ROUTE with ORDER_PERFORM_ACTION See patch #6216 Modified: trunk/common/unit.h trunk/fc_version trunk/server/savecompat.c trunk/server/savegame.c trunk/server/savegame2.c trunk/server/savegame3.c trunk/server/unithand.c trunk/server/unittools.c Modified: trunk/common/unit.h URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/unit.h?rev=29468r1=29467r2=29468view=diff == --- trunk/common/unit.h (original) +++ trunk/common/unit.h Wed Aug 12 12:28:51 2015 @@ -38,7 +38,7 @@ ORDER_BUILD_CITY = 3, ORDER_DISBAND = 4, ORDER_OLD_BUILD_WONDER = 5, - ORDER_TRADE_ROUTE = 6, + ORDER_OLD_TRADE_ROUTE = 6, ORDER_HOMECITY = 7, ORDER_ACTION_MOVE = 8, ORDER_PERFORM_ACTION = 9, Modified: trunk/fc_version URL: http://svn.gna.org/viewcvs/freeciv/trunk/fc_version?rev=29468r1=29467r2=29468view=diff == --- trunk/fc_version(original) +++ trunk/fc_versionWed Aug 12 12:28:51 2015 @@ -54,7 +54,7 @@ # - Avoid adding a new mandatory capability to the development branch for # as long as possible. We want to maintain network compatibility with # the stable branch for as long as possible. -NETWORK_CAPSTRING_MANDATORY=+Freeciv.Devel-3.0-2015.Aug.11b +NETWORK_CAPSTRING_MANDATORY=+Freeciv.Devel-3.0-2015.Aug.12 NETWORK_CAPSTRING_OPTIONAL= FREECIV_DISTRIBUTOR= Modified: trunk/server/savecompat.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/savecompat.c?rev=29468r1=29467r2=29468view=diff == --- trunk/server/savecompat.c (original) +++ trunk/server/savecompat.c Wed Aug 12 12:28:51 2015 @@ -1067,7 +1067,7 @@ case ORDER_OLD_BUILD_WONDER: /* Maps one to one with each other. */ return ACTION_HELP_WONDER; - case ORDER_TRADE_ROUTE: + case ORDER_OLD_TRADE_ROUTE: /* Maps one to one with each other. */ return ACTION_TRADE_ROUTE; case ORDER_MOVE: Modified: trunk/server/savegame.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/savegame.c?rev=29468r1=29467r2=29468view=diff == --- trunk/server/savegame.c (original) +++ trunk/server/savegame.c Wed Aug 12 12:28:51 2015 @@ -301,7 +301,7 @@ return ORDER_OLD_BUILD_WONDER; case 't': case 'T': -return ORDER_TRADE_ROUTE; +return ORDER_OLD_TRADE_ROUTE; case 'h': case 'H': return ORDER_HOMECITY; Modified: trunk/server/savegame2.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/savegame2.c?rev=29468r1=29467r2=29468view=diff == --- trunk/server/savegame2.c(original) +++ trunk/server/savegame2.cWed Aug 12 12:28:51 2015 @@ -582,7 +582,7 @@ return ORDER_OLD_BUILD_WONDER; case 't': case 'T': -return ORDER_TRADE_ROUTE; +return ORDER_OLD_TRADE_ROUTE; case 'h': case 'H': return ORDER_HOMECITY; Modified: trunk/server/savegame3.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/savegame3.c?rev=29468r1=29467r2=29468view=diff == --- trunk/server/savegame3.c(original) +++ trunk/server/savegame3.cWed Aug 12 12:28:51 2015 @@ -724,7 +724,15 @@ #endif /* FREECIV_DEV_SAVE_COMPAT */ case 't': case 'T': -return ORDER_TRADE_ROUTE; +#ifdef FREECIV_DEV_SAVE_COMPAT +/* Will be upgraded with sg_order_to_action(). */ +return ORDER_OLD_TRADE_ROUTE; +#else /* FREECIV_DEV_SAVE_COMPAT */ +/* This order isn't supposed to show up in version 3 save games. */ +log_error(Corrupt save game: trade route ordered the old way.); + +return ORDER_LAST; +#endif /* FREECIV_DEV_SAVE_COMPAT */ case 'h': case 'H': return ORDER_HOMECITY; @@ -756,8 +764,6 @@ return 'b'; case ORDER_DISBAND: return 'd'; - case ORDER_TRADE_ROUTE: -return 't'; case ORDER_HOMECITY: return 'h'; case ORDER_ACTION_MOVE: @@ -765,6 +771,7 @@ case ORDER_PERFORM_ACTION: return 'p'; case ORDER_OLD_BUILD_WONDER: + case ORDER_OLD_TRADE_ROUTE: case ORDER_LAST: break; } @@ -5369,10 +5376,10 @@ case ORDER_FULL_MP: case ORDER_BUILD_CITY: case ORDER_DISBAND: -case ORDER_TRADE_ROUTE: case ORDER_HOMECITY: case ORDER_ACTION_MOVE: case ORDER_OLD_BUILD_WONDER: +case ORDER_OLD_TRADE_ROUTE: case ORDER_LAST: break; } Modified: trunk/server/unithand.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/unithand.c?rev=29468r1=29467r2=29468view=diff
[Freeciv-commits] r29473 - in /trunk/server: savecompat.c savegame3.c
Author: sveinung Date: Wed Aug 12 12:30:52 2015 New Revision: 29473 URL: http://svn.gna.org/viewcvs/freeciv?rev=29473view=rev Log: Fix join foreign city order upgrade The code that upgrades ORDER_BUILD_CITY to ORDER_PERFORM_ACTION was written with pre version 3 save games in mind. The rule that a unit can't join a foreign city is hard coded in those save games. It was then used to provide development version internal save game compatibility for Freeciv 3.0. A Freeciv 3.0 ruleset may permit a unit to join a foreign city. No ruleset currently bundled with Freeciv or Freeciv-web allows it but a save game from a custom ruleset may be out there. Stop assuming that a ORDER_BUILD_CITY to a tile without a domestic city is intended as ORDER_PERFORM_ACTION + ACTION_FOUND_CITY when dev-save-compat is enabled. See the presence of any city at the target tile as ORDER_PERFORM_ACTION + ACTION_FOUND_CITY. Wait until all foreign cities have loaded before running the order upgrade code. Reported by Jacob Nevins jtn See bug #23772 Modified: trunk/server/savecompat.c trunk/server/savegame3.c Modified: trunk/server/savecompat.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/savecompat.c?rev=29473r1=29472r2=29473view=diff == --- trunk/server/savecompat.c (original) +++ trunk/server/savecompat.c Wed Aug 12 12:30:52 2015 @@ -1054,7 +1054,12 @@ switch (order) { case ORDER_OLD_BUILD_CITY: if (tile_city(tgt_tile) +#ifdef FREECIV_DEV_SAVE_COMPAT +/* Freeciv 3.0 allows joining foreign cities. */ +) { +#else /* FREECIV_DEV_SAVE_COMPAT */ city_owner(tile_city(tgt_tile)) == unit_owner(act_unit)) { +#endif /* FREECIV_DEV_SAVE_COMPAT */ /* The player's cities are loaded right before his units. It wasn't * possible for rulesets to allow joining foreign cities before 3.0. * This means that a converted build city order only can be a Join Modified: trunk/server/savegame3.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/savegame3.c?rev=29473r1=29472r2=29473view=diff == --- trunk/server/savegame3.c(original) +++ trunk/server/savegame3.cWed Aug 12 12:30:52 2015 @@ -3296,6 +3296,34 @@ sg_load_player_units_transport(loading, pplayer); } players_iterate_end; +#ifdef FREECIV_DEV_SAVE_COMPAT + /* Upgrade unit orders */ + players_iterate(pplayer) { +unit_list_iterate(pplayer-units, punit) { + int i; + + for (i = 0; i punit-orders.length; i++) { +struct unit_order *order = punit-orders.list[i]; + +if (order-order != ORDER_PERFORM_ACTION + order-action == ACTION_COUNT) { + /* This order may have been replaced by the perform action + * order */ + + /* See if a corresponding action exists. */ + order-action = sg_order_to_action(order-order, punit, + punit-goto_tile); + + if (order-action != ACTION_COUNT) { +/* The order should be upgraded. */ +order-order = ORDER_PERFORM_ACTION; + } +} + } +} unit_list_iterate_end; + } players_iterate_end; +#endif /* FREECIV_DEV_SAVE_COMPAT */ + /* Savegame may contain nation assignments that are incompatible with the * current nationset -- for instance, if it predates the introduction of * nationsets. Ensure they are compatible, one way or another. */ @@ -5144,23 +5172,6 @@ ? ACTION_COUNT : char2num(action_unitstr[j])); -#ifdef FREECIV_DEV_SAVE_COMPAT -if (order-order != ORDER_PERFORM_ACTION - order-action == ACTION_COUNT) { - /* This order may have been replaced by the perform action - * order */ - - /* See if a corresponding action exists. */ - order-action = sg_order_to_action(order-order, punit, - punit-goto_tile); - - if (order-action != ACTION_COUNT) { -/* The order should be upgraded. */ -order-order = ORDER_PERFORM_ACTION; - } -} -#endif /* FREECIV_DEV_SAVE_COMPAT */ - if (order-order == ORDER_LAST || (order-order == ORDER_MOVE !direction8_is_valid(order-dir)) || (order-order == ORDER_ACTIVITY ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r29467 - in /trunk/server: savecompat.c unithand.c
Author: sveinung Date: Wed Aug 12 12:28:31 2015 New Revision: 29467 URL: http://svn.gna.org/viewcvs/freeciv?rev=29467view=rev Log: orders system: support the Establish Trade Route action See patch #6215 Modified: trunk/server/savecompat.c trunk/server/unithand.c Modified: trunk/server/savecompat.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/savecompat.c?rev=29467r1=29466r2=29467view=diff == --- trunk/server/savecompat.c (original) +++ trunk/server/savecompat.c Wed Aug 12 12:28:31 2015 @@ -1068,8 +1068,8 @@ /* Maps one to one with each other. */ return ACTION_HELP_WONDER; case ORDER_TRADE_ROUTE: -/* TODO: Support ACTION_TRADE_ROUTE orders. */ -return ACTION_COUNT; +/* Maps one to one with each other. */ +return ACTION_TRADE_ROUTE; case ORDER_MOVE: case ORDER_ACTION_MOVE: case ORDER_FULL_MP: Modified: trunk/server/unithand.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/unithand.c?rev=29467r1=29466r2=29467view=diff == --- trunk/server/unithand.c (original) +++ trunk/server/unithand.c Wed Aug 12 12:28:31 2015 @@ -3644,6 +3644,7 @@ } break; case ACTION_ESTABLISH_EMBASSY: + case ACTION_TRADE_ROUTE: case ACTION_HELP_WONDER: /* Don't validate that the target tile really contains a city or * that the actor player's map think the target tile has one. ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r29470 - in /trunk: common/actions.c common/unit.c common/unit.h doc/README.actions fc_version server/unithand.c
Author: sveinung Date: Wed Aug 12 12:29:38 2015 New Revision: 29470 URL: http://svn.gna.org/viewcvs/freeciv?rev=29470view=rev Log: Allow joining cities at the neighbor tile This allows rulesets to let units join non allied cities. See patch #6218 Modified: trunk/common/actions.c trunk/common/unit.c trunk/common/unit.h trunk/doc/README.actions trunk/fc_version trunk/server/unithand.c Modified: trunk/common/actions.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/actions.c?rev=29470r1=29469r2=29470view=diff == --- trunk/common/actions.c (original) +++ trunk/common/actions.c Wed Aug 12 12:29:38 2015 @@ -709,15 +709,8 @@ } if (wanted_action == ACTION_JOIN_CITY) { -/* Reason: The Freeciv code assumes that the migrant unit is located - * inside the city it is trying to join. */ -/* Info leak: The actor player knows where his unit is. */ -if (unit_tile(actor_unit) != target_tile) { - return FALSE; -} - /* TODO: Move more individual requirements to the action enabler. */ -if (!unit_can_add_to_city(actor_unit)) { +if (!unit_can_add_to_city(actor_unit, target_city)) { return FALSE; } } Modified: trunk/common/unit.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/unit.c?rev=29470r1=29469r2=29470view=diff == --- trunk/common/unit.c (original) +++ trunk/common/unit.c Wed Aug 12 12:29:38 2015 @@ -351,10 +351,11 @@ Return TRUE iff this unit may be disbanded to add its pop_cost to a city at its current location. / -bool unit_can_add_to_city(const struct unit *punit) +bool unit_can_add_to_city(const struct unit *punit, + const struct city *tgt_city) { return (unit_can_do_action(punit, ACTION_JOIN_CITY) - unit_join_city_test(punit) == UAB_ADD_OK); + unit_join_city_test(punit, tgt_city) == UAB_ADD_OK); } / @@ -373,7 +374,11 @@ / bool unit_can_add_or_build_city(const struct unit *punit) { - return unit_can_build_city(punit) || unit_can_add_to_city(punit); + struct city *tgt_city; + + return (unit_can_build_city(punit) + || ((tgt_city = tile_city(unit_tile(punit))) + unit_can_add_to_city(punit, tgt_city))); } /** @@ -417,10 +422,8 @@ return a 'result' value telling what is allowed. **/ enum unit_add_build_city_result -unit_join_city_test(const struct unit *punit) -{ - struct tile *ptile = unit_tile(punit); - struct city *pcity = tile_city(ptile); +unit_join_city_test(const struct unit *punit, const struct city *pcity) +{ int new_pop; /* Test if we can build. */ Modified: trunk/common/unit.h URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/unit.h?rev=29470r1=29469r2=29470view=diff == --- trunk/common/unit.h (original) +++ trunk/common/unit.h Wed Aug 12 12:29:38 2015 @@ -305,13 +305,14 @@ const struct tile *ptile, bool omniscient); bool is_field_unit(const struct unit *punit); /* ships+aero */ bool is_hiding_unit(const struct unit *punit); -bool unit_can_add_to_city(const struct unit *punit); +bool unit_can_add_to_city(const struct unit *punit, + const struct city *tgt_city); bool unit_can_build_city(const struct unit *punit); bool unit_can_add_or_build_city(const struct unit *punit); enum unit_add_build_city_result unit_build_city_test(const struct unit *punit); enum unit_add_build_city_result -unit_join_city_test(const struct unit *punit); +unit_join_city_test(const struct unit *punit, const struct city *pcity); bool kills_citizen_after_attack(const struct unit *punit); Modified: trunk/doc/README.actions URL: http://svn.gna.org/viewcvs/freeciv/trunk/doc/README.actions?rev=29470r1=29469r2=29470view=diff == --- trunk/doc/README.actions(original) +++ trunk/doc/README.actionsWed Aug 12 12:29:38 2015 @@ -211,7 +211,7 @@ Join City - Add the actor to the target city's population. * UI name can be set using ui_name_join_city * actor must have population to add (set in pop_cost) - * actor must be on the same tile as the target. + * actor must be on the same tile as the target or on the tile next to it. * target city population must not become higher that the add_to_size_limit setting permits. * target must be able to grow to the size that adding the
[Freeciv-commits] r29469 - in /trunk: common/unit.c common/unit.h server/cityhand.c server/unithand.c
Author: sveinung Date: Wed Aug 12 12:29:04 2015 New Revision: 29469 URL: http://svn.gna.org/viewcvs/freeciv?rev=29469view=rev Log: Split the hard coded join and found city requirements from each other Found City and Join City are different actions. Split their hard coded requirements in two different functions. See patch #6217 Modified: trunk/common/unit.c trunk/common/unit.h trunk/server/cityhand.c trunk/server/unithand.c Modified: trunk/common/unit.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/unit.c?rev=29469r1=29468r2=29469view=diff == --- trunk/common/unit.c (original) +++ trunk/common/unit.c Wed Aug 12 12:29:04 2015 @@ -354,7 +354,7 @@ bool unit_can_add_to_city(const struct unit *punit) { return (unit_can_do_action(punit, ACTION_JOIN_CITY) - (UAB_ADD_OK == unit_add_or_build_city_test(punit))); + unit_join_city_test(punit) == UAB_ADD_OK); } / @@ -364,7 +364,7 @@ bool unit_can_build_city(const struct unit *punit) { return (unit_can_do_action(punit, ACTION_FOUND_CITY) - (UAB_BUILD_OK == unit_add_or_build_city_test(punit))); + unit_build_city_test(punit) == UAB_BUILD_OK); } / @@ -373,32 +373,19 @@ / bool unit_can_add_or_build_city(const struct unit *punit) { - enum unit_add_build_city_result res; - - if (!unit_can_do_action(punit, ACTION_FOUND_CITY) - !unit_can_do_action(punit, ACTION_JOIN_CITY)) { -/* The unit can't ever do any of the actions. The current conditions - * don't matter. */ -return FALSE; - } - - res = unit_add_or_build_city_test(punit); - - return (UAB_BUILD_OK == res || UAB_ADD_OK == res); -} - -/ - See if the unit can add to an existing city or build a new city at - its current location, and return a 'result' value telling what is - allowed. -/ + return unit_can_build_city(punit) || unit_can_add_to_city(punit); +} + +/** + See if the unit can build a new city at its current location, and return + a 'result' value telling what is allowed. +**/ enum unit_add_build_city_result -unit_add_or_build_city_test(const struct unit *punit) +unit_build_city_test(const struct unit *punit) { struct tile *ptile = unit_tile(punit); struct city *pcity = tile_city(ptile); bool is_build = unit_is_cityfounder(punit); - int new_pop; /* Test if we can build. */ if (NULL == pcity) { @@ -418,6 +405,27 @@ return UAB_NO_MIN_DIST; } log_error(%s(): Internal error., __FUNCTION__); +return UAB_BAD_CITY_TERRAIN; /* Returns something prohibitive. */ + } else { +/* There is already a city here... */ +return UAB_BAD_CITY_TERRAIN; /* Returns something prohibitive. */ + } +} + +/** + See if the unit can add to an existing city at its current location, and + return a 'result' value telling what is allowed. +**/ +enum unit_add_build_city_result +unit_join_city_test(const struct unit *punit) +{ + struct tile *ptile = unit_tile(punit); + struct city *pcity = tile_city(ptile); + int new_pop; + + /* Test if we can build. */ + if (NULL == pcity) { +/* No city to join. */ return UAB_BAD_CITY_TERRAIN; /* Returns something prohibitive. */ } Modified: trunk/common/unit.h URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/unit.h?rev=29469r1=29468r2=29469view=diff == --- trunk/common/unit.h (original) +++ trunk/common/unit.h Wed Aug 12 12:29:04 2015 @@ -309,7 +309,10 @@ bool unit_can_build_city(const struct unit *punit); bool unit_can_add_or_build_city(const struct unit *punit); enum unit_add_build_city_result -unit_add_or_build_city_test(const struct unit *punit); +unit_build_city_test(const struct unit *punit); +enum unit_add_build_city_result +unit_join_city_test(const struct unit *punit); + bool kills_citizen_after_attack(const struct unit *punit); struct astring; /* Forward declaration. */ Modified: trunk/server/cityhand.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/cityhand.c?rev=29469r1=29468r2=29469view=diff == --- trunk/server/cityhand.c (original) +++ trunk/server/cityhand.c Wed Aug 12 12:29:04 2015 @@ -74,7 +74,7 @@
[Freeciv-commits] r29474 - in /trunk/client: client_main.c clinet.c options.c options.h
Author: cazfi Date: Wed Aug 12 18:01:26 2015 New Revision: 29474 URL: http://svn.gna.org/viewcvs/freeciv?rev=29474view=rev Log: Added client option to automatically update default server and port options to match previously used server. Requested by Markus Raab deb...@markus-raab.org See bug #21752 Modified: trunk/client/client_main.c trunk/client/clinet.c trunk/client/options.c trunk/client/options.h Modified: trunk/client/client_main.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/client_main.c?rev=29474r1=29473r2=29474view=diff == --- trunk/client/client_main.c (original) +++ trunk/client/client_main.c Wed Aug 12 18:01:26 2015 @@ -615,7 +615,9 @@ sz_strlcpy(sound_plugin_name, options.default_sound_plugin_name); } if (server_host[0] == '\0') { -sz_strlcpy(server_host, options.default_server_host); +sz_strlcpy(server_host, options.default_server_host); + } else if (options.use_prev_server) { +sz_strlcpy(options.default_server_host, server_host); } if (user_name[0] == '\0') { sz_strlcpy(user_name, options.default_user_name); @@ -639,6 +641,8 @@ } if (server_port == -1) { server_port = options.default_server_port; + } else if (options.use_prev_server) { +options.default_server_port = server_port; } /* This seed is not saved anywhere; randoms in the client should Modified: trunk/client/clinet.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/clinet.c?rev=29474r1=29473r2=29474view=diff == --- trunk/client/clinet.c (original) +++ trunk/client/clinet.c Wed Aug 12 18:01:26 2015 @@ -256,6 +256,11 @@ return -1; } + if (options.use_prev_server) { +sz_strlcpy(options.default_server_host, hostname); +options.default_server_port = port; + } + return 0; } Modified: trunk/client/options.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/options.c?rev=29474r1=29473r2=29474view=diff == --- trunk/client/options.c (original) +++ trunk/client/options.c Wed Aug 12 18:01:26 2015 @@ -79,6 +79,8 @@ .default_chat_logfile = GUI_DEFAULT_CHAT_LOGFILE, .save_options_on_exit = TRUE, + + .use_prev_server = FALSE, /** Migrations **/ .gui_gtk3_migrated_from_gtk2 = FALSE, @@ -1751,6 +1753,14 @@ in the connection dialogs or with the -a command-line parameter.), COC_NETWORK, GUI_STUB, NULL, NULL), + GEN_BOOL_OPTION(use_prev_server, N_(Default to previously used server), + N_(Automatically update \Server\ and \Server port\ + options to match your latest connection, so by + default you connect to the same server you used + on the previous run. You should enable + saving options on exit too, so that the automatic + updates to the options get saved too.), + COC_NETWORK, GUI_STUB, NULL, NULL), GEN_STR_OPTION(default_server_host, N_(Server), N_(This is the default server hostname that will be used Modified: trunk/client/options.h URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/options.h?rev=29474r1=29473r2=29474view=diff == --- trunk/client/options.h (original) +++ trunk/client/options.h Wed Aug 12 18:01:26 2015 @@ -89,7 +89,8 @@ { char default_user_name[512]; char default_server_host[512]; - int default_server_port; + int default_server_port; + bool use_prev_server; char default_metaserver[512]; char default_tileset_name[512]; char default_sound_set_name[512]; ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r29475 - in /branches/S2_6/client: client_main.c clinet.c options.c options.h
Author: cazfi Date: Wed Aug 12 18:01:34 2015 New Revision: 29475 URL: http://svn.gna.org/viewcvs/freeciv?rev=29475view=rev Log: Added client option to automatically update default server and port options to match previously used server. Requested by Markus Raab deb...@markus-raab.org See bug #21752 Modified: branches/S2_6/client/client_main.c branches/S2_6/client/clinet.c branches/S2_6/client/options.c branches/S2_6/client/options.h Modified: branches/S2_6/client/client_main.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/client_main.c?rev=29475r1=29474r2=29475view=diff == --- branches/S2_6/client/client_main.c (original) +++ branches/S2_6/client/client_main.c Wed Aug 12 18:01:34 2015 @@ -615,7 +615,9 @@ sz_strlcpy(sound_plugin_name, options.default_sound_plugin_name); } if (server_host[0] == '\0') { -sz_strlcpy(server_host, options.default_server_host); +sz_strlcpy(server_host, options.default_server_host); + } else if (options.use_prev_server) { +sz_strlcpy(options.default_server_host, server_host); } if (user_name[0] == '\0') { sz_strlcpy(user_name, options.default_user_name); @@ -639,6 +641,8 @@ } if (server_port == -1) { server_port = options.default_server_port; + } else if (options.use_prev_server) { +options.default_server_port = server_port; } /* This seed is not saved anywhere; randoms in the client should Modified: branches/S2_6/client/clinet.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/clinet.c?rev=29475r1=29474r2=29475view=diff == --- branches/S2_6/client/clinet.c (original) +++ branches/S2_6/client/clinet.c Wed Aug 12 18:01:34 2015 @@ -252,6 +252,11 @@ return -1; } + if (options.use_prev_server) { +sz_strlcpy(options.default_server_host, hostname); +options.default_server_port = port; + } + return 0; } Modified: branches/S2_6/client/options.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/options.c?rev=29475r1=29474r2=29475view=diff == --- branches/S2_6/client/options.c (original) +++ branches/S2_6/client/options.c Wed Aug 12 18:01:34 2015 @@ -79,6 +79,8 @@ .default_chat_logfile = GUI_DEFAULT_CHAT_LOGFILE, .save_options_on_exit = TRUE, + + .use_prev_server = FALSE, /** Migrations **/ .gui_gtk3_migrated_from_gtk2 = FALSE, @@ -1751,6 +1753,14 @@ in the connection dialogs or with the -a command-line parameter.), COC_NETWORK, GUI_STUB, NULL, NULL), + GEN_BOOL_OPTION(use_prev_server, N_(Default to previously used server), + N_(Automatically update \Server\ and \Server port\ + options to match your latest connection, so by + default you connect to the same server you used + on the previous run. You should enable + saving options on exit too, so that the automatic + updates to the options get saved too.), + COC_NETWORK, GUI_STUB, NULL, NULL), GEN_STR_OPTION(default_server_host, N_(Server), N_(This is the default server hostname that will be used Modified: branches/S2_6/client/options.h URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/options.h?rev=29475r1=29474r2=29475view=diff == --- branches/S2_6/client/options.h (original) +++ branches/S2_6/client/options.h Wed Aug 12 18:01:34 2015 @@ -89,7 +89,8 @@ { char default_user_name[512]; char default_server_host[512]; - int default_server_port; + int default_server_port; + bool use_prev_server; char default_metaserver[512]; char default_tileset_name[512]; char default_sound_set_name[512]; ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r29477 - in /branches/S2_6: data/alien/ doc/
Author: cazfi Date: Wed Aug 12 19:17:34 2015 New Revision: 29477 URL: http://svn.gna.org/viewcvs/freeciv?rev=29477view=rev Log: Made alien ruleset Transportation building to work on both square and hex based topologies. See bug #23761 Modified: branches/S2_6/data/alien/buildings.ruleset branches/S2_6/data/alien/effects.ruleset branches/S2_6/data/alien/game.ruleset branches/S2_6/doc/README.ruleset_alien Modified: branches/S2_6/data/alien/buildings.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/alien/buildings.ruleset?rev=29477r1=29476r2=29477view=diff == --- branches/S2_6/data/alien/buildings.ruleset (original) +++ branches/S2_6/data/alien/buildings.ruleset Wed Aug 12 19:17:34 2015 @@ -374,7 +374,8 @@ helptext = _(\ City workers can travel further from city center to work and \ goods can be transported from further away to city center. \ -Makes city area 8 tiles bigger.\ +On hex maps city radius grows to 2 tiles. \ +On square based maps increases city area by 8 tiles.\ ) [building_radar_tower] Modified: branches/S2_6/data/alien/effects.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/alien/effects.ruleset?rev=29477r1=29476r2=29477view=diff == --- branches/S2_6/data/alien/effects.ruleset(original) +++ branches/S2_6/data/alien/effects.rulesetWed Aug 12 19:17:34 2015 @@ -960,6 +960,14 @@ Tech, Personal Contact, Player } +[effect_square_map_city_radius] +type = City_Radius_Sq +value = 1 +reqs = +{ type, name, range, present + Topology, Hex, World, FALSE +} + [effect_transportation] type = City_Radius_Sq value = 1 Modified: branches/S2_6/data/alien/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/alien/game.ruleset?rev=29477r1=29476r2=29477view=diff == --- branches/S2_6/data/alien/game.ruleset (original) +++ branches/S2_6/data/alien/game.ruleset Wed Aug 12 19:17:34 2015 @@ -52,7 +52,7 @@ min_city_center_trade = 1 ; Square of initial city radius -init_city_radius_sq = 4 +init_city_radius_sq = 3 ; Square of initially visible radius (true distance). init_vis_radius_sq = 5 Modified: branches/S2_6/doc/README.ruleset_alien URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/doc/README.ruleset_alien?rev=29477r1=29476r2=29477view=diff == --- branches/S2_6/doc/README.ruleset_alien (original) +++ branches/S2_6/doc/README.ruleset_alien Wed Aug 12 19:17:34 2015 @@ -112,7 +112,8 @@ - Water Engineer build_cost increased to 40, like other City Founding units -- Hex topology is used by default +- Hex topology is used by default. On hex maps Transportation building + increases city radius to 2 tiles. - Stealth Spies cannot establish embassies. They are already granted by Communication tech ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r29476 - in /trunk: data/alien/buildings.ruleset data/alien/effects.ruleset data/alien/game.ruleset doc/README.ruleset_alien
Author: cazfi Date: Wed Aug 12 19:17:21 2015 New Revision: 29476 URL: http://svn.gna.org/viewcvs/freeciv?rev=29476view=rev Log: Made alien ruleset Transportation building to work on both square and hex based topologies. See bug #23761 Modified: trunk/data/alien/buildings.ruleset trunk/data/alien/effects.ruleset trunk/data/alien/game.ruleset trunk/doc/README.ruleset_alien Modified: trunk/data/alien/buildings.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/buildings.ruleset?rev=29476r1=29475r2=29476view=diff == --- trunk/data/alien/buildings.ruleset (original) +++ trunk/data/alien/buildings.ruleset Wed Aug 12 19:17:21 2015 @@ -378,7 +378,8 @@ helptext = _(\ City workers can travel further from city center to work and \ goods can be transported from further away to city center. \ -Makes city area 8 tiles bigger.\ +On hex maps city radius grows to 2 tiles. \ +On square based maps increases city area by 8 tiles.\ ) [building_radar_tower] Modified: trunk/data/alien/effects.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/effects.ruleset?rev=29476r1=29475r2=29476view=diff == --- trunk/data/alien/effects.ruleset(original) +++ trunk/data/alien/effects.rulesetWed Aug 12 19:17:21 2015 @@ -969,6 +969,14 @@ Tech, Personal Contact, Player } +[effect_square_map_city_radius] +type = City_Radius_Sq +value = 1 +reqs = +{ type, name, range, present + Topology, Hex, World, FALSE +} + [effect_transportation] type = City_Radius_Sq value = 1 Modified: trunk/data/alien/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/game.ruleset?rev=29476r1=29475r2=29476view=diff == --- trunk/data/alien/game.ruleset (original) +++ trunk/data/alien/game.ruleset Wed Aug 12 19:17:21 2015 @@ -53,7 +53,7 @@ min_city_center_trade = 1 ; Square of initial city radius -init_city_radius_sq = 4 +init_city_radius_sq = 3 ; Square of initially visible radius (true distance). init_vis_radius_sq = 5 Modified: trunk/doc/README.ruleset_alien URL: http://svn.gna.org/viewcvs/freeciv/trunk/doc/README.ruleset_alien?rev=29476r1=29475r2=29476view=diff == --- trunk/doc/README.ruleset_alien (original) +++ trunk/doc/README.ruleset_alien Wed Aug 12 19:17:21 2015 @@ -112,7 +112,8 @@ - Water Engineer build_cost increased to 40, like other City Founding units -- Hex topology is used by default +- Hex topology is used by default. On hex maps Transportation building + increases city radius to 2 tiles. - Stealth Spies cannot establish embassies. They are already granted by Communication tech ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r29478 - in /trunk: data/alien/ data/civ1/ data/civ2/ data/civ2civ3/ data/classic/ data/experimental/ data/multiplayer/ data...
Author: cazfi Date: Wed Aug 12 19:38:22 2015 New Revision: 29478 URL: http://svn.gna.org/viewcvs/freeciv?rev=29478view=rev Log: Made victory_lead_pct to be just the lead, not 100% for a draw already See patch #6205 Modified: trunk/data/alien/game.ruleset trunk/data/civ1/game.ruleset trunk/data/civ2/game.ruleset trunk/data/civ2civ3/game.ruleset trunk/data/classic/game.ruleset trunk/data/experimental/game.ruleset trunk/data/multiplayer/game.ruleset trunk/data/stub/game.ruleset trunk/server/srv_main.c Modified: trunk/data/alien/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/game.ruleset?rev=29478r1=29477r2=29478view=diff == --- trunk/data/alien/game.ruleset (original) +++ trunk/data/alien/game.ruleset Wed Aug 12 19:38:22 2015 @@ -434,8 +434,8 @@ ; Minimum culture points for cultural domination victory victory_min_points = 1000 -; Lead needed relative to second best player -victory_lead_pct = 300 +; How big lead relative to second best player is needed for victory +victory_lead_pct = 200 ; How much each culture point affects the migration ; from/to the city. Modified: trunk/data/civ1/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/game.ruleset?rev=29478r1=29477r2=29478view=diff == --- trunk/data/civ1/game.ruleset(original) +++ trunk/data/civ1/game.rulesetWed Aug 12 19:38:22 2015 @@ -411,8 +411,8 @@ ; Minimum culture points for cultural domination victory victory_min_points = 1000 -; Lead needed relative to second best player -victory_lead_pct = 300 +; How big lead relative to second best player is needed for victory +victory_lead_pct = 200 ; How much each culture point affects the migration ; from/to the city. Modified: trunk/data/civ2/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/game.ruleset?rev=29478r1=29477r2=29478view=diff == --- trunk/data/civ2/game.ruleset(original) +++ trunk/data/civ2/game.rulesetWed Aug 12 19:38:22 2015 @@ -468,8 +468,8 @@ ; Minimum culture points for cultural domination victory victory_min_points = 1000 -; Lead needed relative to second best player -victory_lead_pct = 300 +; How big lead relative to second best player is needed for victory +victory_lead_pct = 200 ; How much each culture point affects the migration ; from/to the city. Modified: trunk/data/civ2civ3/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/game.ruleset?rev=29478r1=29477r2=29478view=diff == --- trunk/data/civ2civ3/game.ruleset(original) +++ trunk/data/civ2civ3/game.rulesetWed Aug 12 19:38:22 2015 @@ -541,8 +541,8 @@ ; Minimum culture points for cultural domination victory victory_min_points = 1000 -; Lead needed relative to second best player -victory_lead_pct = 300 +; How big lead relative to second best player is needed for victory +victory_lead_pct = 200 ; How much each culture point affects the migration ; from/to the city. Modified: trunk/data/classic/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/game.ruleset?rev=29478r1=29477r2=29478view=diff == --- trunk/data/classic/game.ruleset (original) +++ trunk/data/classic/game.ruleset Wed Aug 12 19:38:22 2015 @@ -497,8 +497,8 @@ ; Minimum culture points for cultural domination victory victory_min_points = 1000 -; Lead needed relative to second best player -victory_lead_pct = 300 +; How big lead relative to second best player is needed for victory +victory_lead_pct = 200 ; How much each culture point affects the migration ; from/to the city. Modified: trunk/data/experimental/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/game.ruleset?rev=29478r1=29477r2=29478view=diff == --- trunk/data/experimental/game.ruleset(original) +++ trunk/data/experimental/game.rulesetWed Aug 12 19:38:22 2015 @@ -515,8 +515,8 @@ ; Minimum culture points for cultural domination victory victory_min_points = 1000 -; Lead needed relative to second best player -victory_lead_pct = 300 +; How big lead relative to second best player is needed for victory +victory_lead_pct = 200 ; How much each culture point affects the migration ; from/to the city. Modified: trunk/data/multiplayer/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/game.ruleset?rev=29478r1=29477r2=29478view=diff == ---
[Freeciv-commits] r29479 - in /branches/S2_6: data/alien/ data/civ1/ data/civ2/ data/civ2civ3/ data/classic/ data/experimental/ data/multiplay...
Author: cazfi Date: Wed Aug 12 19:38:30 2015 New Revision: 29479 URL: http://svn.gna.org/viewcvs/freeciv?rev=29479view=rev Log: Made victory_lead_pct to be just the lead, not 100% for a draw already See patch #6205 Modified: branches/S2_6/data/alien/game.ruleset branches/S2_6/data/civ1/game.ruleset branches/S2_6/data/civ2/game.ruleset branches/S2_6/data/civ2civ3/game.ruleset branches/S2_6/data/classic/game.ruleset branches/S2_6/data/experimental/game.ruleset branches/S2_6/data/multiplayer/game.ruleset branches/S2_6/data/stub/game.ruleset branches/S2_6/server/srv_main.c Modified: branches/S2_6/data/alien/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/alien/game.ruleset?rev=29479r1=29478r2=29479view=diff == --- branches/S2_6/data/alien/game.ruleset (original) +++ branches/S2_6/data/alien/game.ruleset Wed Aug 12 19:38:30 2015 @@ -376,8 +376,8 @@ ; Minimum culture points for cultural domination victory victory_min_points = 1000 -; Lead needed relative to second best player -victory_lead_pct = 300 +; How big lead relative to second best player is needed for victory +victory_lead_pct = 200 ; How much each culture point affects the migration ; from/to the city. Modified: branches/S2_6/data/civ1/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/civ1/game.ruleset?rev=29479r1=29478r2=29479view=diff == --- branches/S2_6/data/civ1/game.ruleset(original) +++ branches/S2_6/data/civ1/game.rulesetWed Aug 12 19:38:30 2015 @@ -376,8 +376,8 @@ ; Minimum culture points for cultural domination victory victory_min_points = 1000 -; Lead needed relative to second best player -victory_lead_pct = 300 +; How big lead relative to second best player is needed for victory +victory_lead_pct = 200 ; How much each culture point affects the migration ; from/to the city. Modified: branches/S2_6/data/civ2/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/civ2/game.ruleset?rev=29479r1=29478r2=29479view=diff == --- branches/S2_6/data/civ2/game.ruleset(original) +++ branches/S2_6/data/civ2/game.rulesetWed Aug 12 19:38:30 2015 @@ -418,8 +418,8 @@ ; Minimum culture points for cultural domination victory victory_min_points = 1000 -; Lead needed relative to second best player -victory_lead_pct = 300 +; How big lead relative to second best player is needed for victory +victory_lead_pct = 200 ; How much each culture point affects the migration ; from/to the city. Modified: branches/S2_6/data/civ2civ3/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/civ2civ3/game.ruleset?rev=29479r1=29478r2=29479view=diff == --- branches/S2_6/data/civ2civ3/game.ruleset(original) +++ branches/S2_6/data/civ2civ3/game.rulesetWed Aug 12 19:38:30 2015 @@ -473,8 +473,8 @@ ; Minimum culture points for cultural domination victory victory_min_points = 1000 -; Lead needed relative to second best player -victory_lead_pct = 300 +; How big lead relative to second best player is needed for victory +victory_lead_pct = 200 ; How much each culture point affects the migration ; from/to the city. Modified: branches/S2_6/data/classic/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/classic/game.ruleset?rev=29479r1=29478r2=29479view=diff == --- branches/S2_6/data/classic/game.ruleset (original) +++ branches/S2_6/data/classic/game.ruleset Wed Aug 12 19:38:30 2015 @@ -462,8 +462,8 @@ ; Minimum culture points for cultural domination victory victory_min_points = 1000 -; Lead needed relative to second best player -victory_lead_pct = 300 +; How big lead relative to second best player is needed for victory +victory_lead_pct = 200 ; How much each culture point affects the migration ; from/to the city. Modified: branches/S2_6/data/experimental/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/experimental/game.ruleset?rev=29479r1=29478r2=29479view=diff == --- branches/S2_6/data/experimental/game.ruleset(original) +++ branches/S2_6/data/experimental/game.rulesetWed Aug 12 19:38:30 2015 @@ -480,8 +480,8 @@ ; Minimum culture points for cultural domination victory victory_min_points = 1000 -; Lead needed relative to second best player -victory_lead_pct = 300 +; How big lead relative to second best player is needed for victory +victory_lead_pct = 200 ; How much each culture point affects the migration ; from/to the city.
[Freeciv-commits] r29480 - /trunk/server/civserver.c
Author: cazfi Date: Wed Aug 12 19:44:16 2015 New Revision: 29480 URL: http://svn.gna.org/viewcvs/freeciv?rev=29480view=rev Log: Improved coding style of the Mac options parsing code in civserver.c See patch #6204 Modified: trunk/server/civserver.c Modified: trunk/server/civserver.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/civserver.c?rev=29480r1=29479r2=29480view=diff == --- trunk/server/civserver.c(original) +++ trunk/server/civserver.cWed Aug 12 19:44:16 2015 @@ -473,11 +473,10 @@ #define HARDCODED_OPT /*temporary hack since GetNewDialog() doesn't want to work*/ #ifdef HARDCODED_OPT - srvarg.log_filename=log.out; - srvarg.loglevel=LOG_DEBUG; + srvarg.log_filename = log.out; + srvarg.loglevel = LOG_DEBUG; #else /* HARDCODED_OPT */ - if (argc == 0) - { + if (argc == 0) { OSErr err; DialogPtr optptr; Ptr storage; @@ -489,51 +488,45 @@ short the_item, old_item=16; int done = false; Str255 the_string; -/*load/init the stuff for the dialog*/ -storage =NewPtr(sizeof(DialogRecord)); -if (storage == 0) -{ + +/* load/init the stuff for the dialog */ +storage = NewPtr(sizeof(DialogRecord)); +if (storage == 0) { exit(EXIT_FAILURE); } -ditl=Get1Resource('DITL',200); -if ((ditl == 0)||(ResError())) -{ +ditl = Get1Resource('DITL',200); +if ((ditl == 0) || (ResError())) { exit(EXIT_FAILURE); } -dlog=Get1Resource('DLOG',200); -if ((dlog == 0)||(ResError())) -{ +dlog = Get1Resource('DLOG',200); +if ((dlog == 0) || (ResError())) { exit(EXIT_FAILURE); } -/*make the dialog*/ -optptr=GetNewDialog(200, storage, (WindowPtr)-1L); -/*setup the dialog*/ -err=SetDialogDefaultItem(optptr, 1); -if (err != 0) -{ +/* make the dialog */ +optptr = GetNewDialog(200, storage, (WindowPtr)-1L); +/* setup the dialog */ +err = SetDialogDefaultItem(optptr, 1); +if (err != 0) { exit(EXIT_FAILURE); } -/*insert default highlight draw code?*/ +/* insert default highlight draw code? */ err=SetDialogCancelItem(optptr, 2); -if (err != 0) -{ +if (err != 0) { exit(EXIT_FAILURE); } err=SetDialogTracksCursor(optptr, true); -if (err != 0) -{ +if (err != 0) { exit(EXIT_FAILURE); } GetDItem(optptr, 16/*normal radio button*/, the_type, the_handle, the_rect); SetCtlValue((ControlHandle)the_handle, true); -while(!done)/*loop*/ +while (!done) /* loop */ { ModalDialog(0L, the_item);/* don't feed 0 where a upp is expected? */ /* old book suggests using OL(NIL) as the first argument, but It doesn't include anything about UPPs either, so... */ - switch (the_item) - { + switch (the_item) { case 1: done = true; break; @@ -567,19 +560,16 @@ GetDItem( optptr, 10, the_type, the_handle, the_rect); GetIText( the_handle, (unsigned char *)srvarg.script_filename); GetDItem(optptr, 15, the_type, the_handle, the_rect); -if(GetControlValue((ControlHandle)the_handle)) -{ - srvarg.loglevel=LOG_FATAL; +if (GetControlValue((ControlHandle)the_handle)) { + srvarg.loglevel = LOG_FATAL; } GetDItem(optptr, 16, the_type, the_handle, the_rect); -if(GetControlValue((ControlHandle)the_handle)) -{ - srvarg.loglevel=LOG_NORMAL; +if (GetControlValue((ControlHandle)the_handle)) { + srvarg.loglevel = LOG_NORMAL; } GetDItem(optptr, 17, the_type, the_handle, the_rect); -if(GetControlValue((ControlHandle)the_handle)) -{ - srvarg.loglevel=LOG_VERBOSE; +if (GetControlValue((ControlHandle)the_handle)) { + srvarg.loglevel = LOG_VERBOSE; } DisposeDialog(optptr);/*get rid of the dialog after sorting out the options*/ DisposePtr(storage);/*clean up the allocated memory*/ ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r29481 - /branches/S2_6/server/civserver.c
Author: cazfi Date: Wed Aug 12 19:44:23 2015 New Revision: 29481 URL: http://svn.gna.org/viewcvs/freeciv?rev=29481view=rev Log: Improved coding style of the Mac options parsing code in civserver.c See patch #6204 Modified: branches/S2_6/server/civserver.c Modified: branches/S2_6/server/civserver.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/civserver.c?rev=29481r1=29480r2=29481view=diff == --- branches/S2_6/server/civserver.c(original) +++ branches/S2_6/server/civserver.cWed Aug 12 19:44:23 2015 @@ -473,11 +473,10 @@ #define HARDCODED_OPT /*temporary hack since GetNewDialog() doesn't want to work*/ #ifdef HARDCODED_OPT - srvarg.log_filename=log.out; - srvarg.loglevel=LOG_DEBUG; + srvarg.log_filename = log.out; + srvarg.loglevel = LOG_DEBUG; #else /* HARDCODED_OPT */ - if (argc == 0) - { + if (argc == 0) { OSErr err; DialogPtr optptr; Ptr storage; @@ -489,51 +488,45 @@ short the_item, old_item=16; int done = false; Str255 the_string; -/*load/init the stuff for the dialog*/ -storage =NewPtr(sizeof(DialogRecord)); -if (storage == 0) -{ + +/* load/init the stuff for the dialog */ +storage = NewPtr(sizeof(DialogRecord)); +if (storage == 0) { exit(EXIT_FAILURE); } -ditl=Get1Resource('DITL',200); -if ((ditl == 0)||(ResError())) -{ +ditl = Get1Resource('DITL',200); +if ((ditl == 0) || (ResError())) { exit(EXIT_FAILURE); } -dlog=Get1Resource('DLOG',200); -if ((dlog == 0)||(ResError())) -{ +dlog = Get1Resource('DLOG',200); +if ((dlog == 0) || (ResError())) { exit(EXIT_FAILURE); } -/*make the dialog*/ -optptr=GetNewDialog(200, storage, (WindowPtr)-1L); -/*setup the dialog*/ -err=SetDialogDefaultItem(optptr, 1); -if (err != 0) -{ +/* make the dialog */ +optptr = GetNewDialog(200, storage, (WindowPtr)-1L); +/* setup the dialog */ +err = SetDialogDefaultItem(optptr, 1); +if (err != 0) { exit(EXIT_FAILURE); } -/*insert default highlight draw code?*/ +/* insert default highlight draw code? */ err=SetDialogCancelItem(optptr, 2); -if (err != 0) -{ +if (err != 0) { exit(EXIT_FAILURE); } err=SetDialogTracksCursor(optptr, true); -if (err != 0) -{ +if (err != 0) { exit(EXIT_FAILURE); } GetDItem(optptr, 16/*normal radio button*/, the_type, the_handle, the_rect); SetCtlValue((ControlHandle)the_handle, true); -while(!done)/*loop*/ +while (!done) /* loop */ { ModalDialog(0L, the_item);/* don't feed 0 where a upp is expected? */ /* old book suggests using OL(NIL) as the first argument, but It doesn't include anything about UPPs either, so... */ - switch (the_item) - { + switch (the_item) { case 1: done = true; break; @@ -567,19 +560,16 @@ GetDItem( optptr, 10, the_type, the_handle, the_rect); GetIText( the_handle, (unsigned char *)srvarg.script_filename); GetDItem(optptr, 15, the_type, the_handle, the_rect); -if(GetControlValue((ControlHandle)the_handle)) -{ - srvarg.loglevel=LOG_FATAL; +if (GetControlValue((ControlHandle)the_handle)) { + srvarg.loglevel = LOG_FATAL; } GetDItem(optptr, 16, the_type, the_handle, the_rect); -if(GetControlValue((ControlHandle)the_handle)) -{ - srvarg.loglevel=LOG_NORMAL; +if (GetControlValue((ControlHandle)the_handle)) { + srvarg.loglevel = LOG_NORMAL; } GetDItem(optptr, 17, the_type, the_handle, the_rect); -if(GetControlValue((ControlHandle)the_handle)) -{ - srvarg.loglevel=LOG_VERBOSE; +if (GetControlValue((ControlHandle)the_handle)) { + srvarg.loglevel = LOG_VERBOSE; } DisposeDialog(optptr);/*get rid of the dialog after sorting out the options*/ DisposePtr(storage);/*clean up the allocated memory*/ ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits