[Freeciv-commits] r33960 - /branches/S2_5/server/unithand.c
Author: cazfi Date: Sun Oct 2 08:00:15 2016 New Revision: 33960 URL: http://svn.gna.org/viewcvs/freeciv?rev=33960&view=rev Log: Do not try to make 'disband' act like 'help wonder' for caravans. Reported by Sveinung Kvilhaugsvik See bug #23911 Modified: branches/S2_5/server/unithand.c Modified: branches/S2_5/server/unithand.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/unithand.c?rev=33960&r1=33959&r2=33960&view=diff == --- branches/S2_5/server/unithand.c (original) +++ branches/S2_5/server/unithand.c Sun Oct 2 08:00:15 2016 @@ -500,23 +500,11 @@ * Note: Nowadays it's possible to disband unit in allied city and * your ally receives those shields. Should it be like this? Why not? * That's why we must use city_owner instead of pplayer -- Zamar */ - -if (unit_has_type_flag(punit, UTYF_HELP_WONDER)) { - /* Count this just like a caravan that was added to a wonder. - * However don't actually give the city the extra shields unless - * they are building a wonder (but switching to a wonder later in - * the turn will give the extra shields back). */ - pcity->caravan_shields += unit_build_shield_cost(punit); - if (unit_can_help_build_wonder(punit, pcity)) { - pcity->shield_stock += unit_build_shield_cost(punit); - } else { - pcity->shield_stock += unit_disband_shields(punit); - } -} else { - pcity->shield_stock += unit_disband_shields(punit); - /* If we change production later at this turn. No penalty is added. */ - pcity->disbanded_shields += unit_disband_shields(punit); -} +int shields = unit_disband_shields(punit); + +pcity->shield_stock += shields; +/* If we change production later at this turn. No penalty is added. */ +pcity->disbanded_shields += shields; send_city_info(city_owner(pcity), pcity); } ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33959 - /branches/S2_6/server/unithand.c
Author: cazfi Date: Sun Oct 2 08:00:08 2016 New Revision: 33959 URL: http://svn.gna.org/viewcvs/freeciv?rev=33959&view=rev Log: Do not try to make 'disband' act like 'help wonder' for caravans. Reported by Sveinung Kvilhaugsvik See bug #23911 Modified: branches/S2_6/server/unithand.c Modified: branches/S2_6/server/unithand.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/unithand.c?rev=33959&r1=33958&r2=33959&view=diff == --- branches/S2_6/server/unithand.c (original) +++ branches/S2_6/server/unithand.c Sun Oct 2 08:00:08 2016 @@ -1615,24 +1615,11 @@ * Note: Nowadays it's possible to disband unit in allied city and * your ally receives those shields. Should it be like this? Why not? * That's why we must use city_owner instead of pplayer -- Zamar */ - -if (unit_can_do_action(punit, ACTION_HELP_WONDER)) { - /* Count this just like a caravan that was added to a wonder. - * However don't actually give the city the extra shields unless - * they are building a wonder (but switching to a wonder later in - * the turn will give the extra shields back). */ - pcity->caravan_shields += unit_build_shield_cost(punit); - if (is_action_enabled_unit_on_city(ACTION_HELP_WONDER, - punit, pcity)) { - pcity->shield_stock += unit_build_shield_cost(punit); - } else { - pcity->shield_stock += unit_disband_shields(punit); - } -} else { - pcity->shield_stock += unit_disband_shields(punit); - /* If we change production later at this turn. No penalty is added. */ - pcity->disbanded_shields += unit_disband_shields(punit); -} +int shields = unit_disband_shields(punit); + +pcity->shield_stock += shields; +/* If we change production later at this turn. No penalty is added. */ +pcity->disbanded_shields += shields; send_city_info(city_owner(pcity), pcity); } ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33958 - /trunk/server/unithand.c
Author: cazfi Date: Sun Oct 2 07:59:59 2016 New Revision: 33958 URL: http://svn.gna.org/viewcvs/freeciv?rev=33958&view=rev Log: Do not try to make 'disband' act like 'help wonder' for caravans. Reported by Sveinung Kvilhaugsvik See bug #23911 Modified: trunk/server/unithand.c Modified: trunk/server/unithand.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/unithand.c?rev=33958&r1=33957&r2=33958&view=diff == --- trunk/server/unithand.c (original) +++ trunk/server/unithand.c Sun Oct 2 07:59:59 2016 @@ -2561,6 +2561,8 @@ struct unit *punit, struct city *pcity) { + int shields; + /* Sanity check: The actor still exists. */ fc_assert_ret_val(pplayer, FALSE); fc_assert_ret_val(punit, FALSE); @@ -2568,19 +2570,14 @@ /* Sanity check: The target city still exists. */ fc_assert_ret_val(pcity, FALSE); + shields = unit_disband_shields(punit); + /* Add the shields from recycling the unit to the city's current * production. */ - pcity->shield_stock += unit_disband_shields(punit); - - if (unit_can_do_action(punit, ACTION_HELP_WONDER)) { -/* Count this just like a caravan that was added to a wonder. - * However don't actually give the city the extra shields. Switching - * to a wonder later in the turn will give the extra shields back. */ -pcity->caravan_shields += unit_build_shield_cost(punit); - } else { -/* If we change production later at this turn. No penalty is added. */ -pcity->disbanded_shields += unit_disband_shields(punit); - } + pcity->shield_stock += shields; + + /* If we change production later at this turn. No penalty is added. */ + pcity->disbanded_shields += shields; notify_player(pplayer, city_tile(pcity), E_CARAVAN_ACTION, ftc_server, /* TRANS: ... Ironclad ... New York */ ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33957 - in /trunk/data/sandbox: README.sandbox effects.ruleset
Author: cazfi Date: Sat Oct 1 16:25:51 2016 New Revision: 33957 URL: http://svn.gna.org/viewcvs/freeciv?rev=33957&view=rev Log: Sandbox ruleset Republic has corruption increased by distance relative to the world size. See patch #7597 Modified: trunk/data/sandbox/README.sandbox trunk/data/sandbox/effects.ruleset Modified: trunk/data/sandbox/README.sandbox URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/sandbox/README.sandbox?rev=33957&r1=33956&r2=33957&view=diff == --- trunk/data/sandbox/README.sandbox (original) +++ trunk/data/sandbox/README.sandbox Sat Oct 1 16:25:51 2016 @@ -73,4 +73,10 @@ Trade routes can carry many kinds of goods. There is production chains like that city with Mine can trade Ore to a city that then can trade Metal to third city which can then trade Goods or Equipment to fourth -city. Goods later in chains trade for higher value. +city. Goods later in chains trade for higher value. + +Corruption and World Size: +Under Republic government, the speed corruption increases as one goes +further from the capital is relative to the size of the world. At +the maximum distance corruption is the same regardless of the size of +the world. Modified: trunk/data/sandbox/effects.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/sandbox/effects.ruleset?rev=33957&r1=33956&r2=33957&view=diff == --- trunk/data/sandbox/effects.ruleset (original) +++ trunk/data/sandbox/effects.ruleset Sat Oct 1 16:25:51 2016 @@ -518,8 +518,9 @@ type= "Output_Waste_By_Distance" value = 1 reqs= -{ "type", "name", "range" - "OutputType", "Trade", "Local" +{ "type", "name", "range", "present" + "OutputType", "Trade", "Local", TRUE + "Gov", "Republic", "Player", FALSE } ; 1 + 1 => -2% each tile without advanced tech / govs @@ -531,6 +532,14 @@ "OutputType", "Trade", "Local", TRUE "Tech", "The Corporation", "Player", FALSE "Gov", "Communism", "Player", FALSE +} + +[effect_corruption_distance_republic] +type= "Output_Waste_By_Rel_Distance" +value = 1 +reqs= +{ "type", "name", "range" + "Gov", "Republic", "Player" } ; Total = 0 for Communism ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33956 - in /trunk/m4: debug.m4 gprof.m4
Author: cazfi Date: Sat Oct 1 16:14:43 2016 New Revision: 33956 URL: http://svn.gna.org/viewcvs/freeciv?rev=33956&view=rev Log: Removed double [[braces]] around some default values in configure --help. See patch #7737 Modified: trunk/m4/debug.m4 trunk/m4/gprof.m4 Modified: trunk/m4/debug.m4 URL: http://svn.gna.org/viewcvs/freeciv/trunk/m4/debug.m4?rev=33956&r1=33955&r2=33956&view=diff == --- trunk/m4/debug.m4 (original) +++ trunk/m4/debug.m4 Sat Oct 1 16:14:43 2016 @@ -1,6 +1,6 @@ AC_DEFUN([FC_DEBUG], [ AC_ARG_ENABLE(debug, - AS_HELP_STRING([--enable-debug[[=no/some/yes/checks]]], [turn on debugging [[default=some]]]), + AS_HELP_STRING([--enable-debug[[=no/some/yes/checks]]], [turn on debugging [default=some]]), [case "${enableval}" in yes)enable_debug=yes ;; some) enable_debug=some ;; Modified: trunk/m4/gprof.m4 URL: http://svn.gna.org/viewcvs/freeciv/trunk/m4/gprof.m4?rev=33956&r1=33955&r2=33956&view=diff == --- trunk/m4/gprof.m4 (original) +++ trunk/m4/gprof.m4 Sat Oct 1 16:14:43 2016 @@ -1,6 +1,6 @@ AC_DEFUN([FC_GPROF], [ AC_ARG_ENABLE([gprof], - AS_HELP_STRING([--enable-gprof], [turn on profiling [[default=no]]]), + AS_HELP_STRING([--enable-gprof], [turn on profiling [default=no]]), [case "${enableval}" in yes) enable_gprof=yes ;; no) enable_gprof=no ;; ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33955 - /trunk/client/gui-qt/helpdlg.cpp
Author: cazfi Date: Sat Oct 1 15:20:04 2016 New Revision: 33955 URL: http://svn.gna.org/viewcvs/freeciv?rev=33955&view=rev Log: Fixed broken Qt-client compile. Reported by Jacob Nevins See patch #7735 Modified: trunk/client/gui-qt/helpdlg.cpp Modified: trunk/client/gui-qt/helpdlg.cpp URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/helpdlg.cpp?rev=33955&r1=33954&r2=33955&view=diff == --- trunk/client/gui-qt/helpdlg.cpp (original) +++ trunk/client/gui-qt/helpdlg.cpp Sat Oct 1 15:20:04 2016 @@ -698,6 +698,7 @@ case HELP_UNIT: set_topic_unit(topic, title); break; +case HELP_GOODS: case HELP_LAST: // Just to avoid warning break; } ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits