[Freeciv-commits] r24791 - in /trunk: client/helpdata.c common/improvement.c common/improvement.h common/requirements.c server/cityturn.c
Author: jtn Date: Wed Apr 23 22:10:53 2014 New Revision: 24791 URL: http://svn.gna.org/viewcvs/freeciv?rev=24791view=rev Log: Fix numerous issues in textual descriptions of requirements. See gna patch #4400. Modified: trunk/client/helpdata.c trunk/common/improvement.c trunk/common/improvement.h trunk/common/requirements.c trunk/server/cityturn.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/client/helpdata.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/helpdata.c?rev=24791r1=24790r2=24791view=diff Modified: trunk/common/improvement.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/improvement.c?rev=24791r1=24790r2=24791view=diff Modified: trunk/common/improvement.h URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/improvement.h?rev=24791r1=24790r2=24791view=diff Modified: trunk/common/requirements.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/requirements.c?rev=24791r1=24790r2=24791view=diff Modified: trunk/server/cityturn.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/cityturn.c?rev=24791r1=24790r2=24791view=diff ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r24792 - in /branches/S2_5: client/helpdata.c common/improvement.c common/improvement.h common/requirements.c server/cityturn.c
Author: jtn Date: Wed Apr 23 22:12:15 2014 New Revision: 24792 URL: http://svn.gna.org/viewcvs/freeciv?rev=24792view=rev Log: Fix numerous issues in textual descriptions of requirements. See gna patch #4400. Modified: branches/S2_5/client/helpdata.c branches/S2_5/common/improvement.c branches/S2_5/common/improvement.h branches/S2_5/common/requirements.c branches/S2_5/server/cityturn.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: branches/S2_5/client/helpdata.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/helpdata.c?rev=24792r1=24791r2=24792view=diff Modified: branches/S2_5/common/improvement.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/common/improvement.c?rev=24792r1=24791r2=24792view=diff Modified: branches/S2_5/common/improvement.h URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/common/improvement.h?rev=24792r1=24791r2=24792view=diff Modified: branches/S2_5/common/requirements.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/common/requirements.c?rev=24792r1=24791r2=24792view=diff Modified: branches/S2_5/server/cityturn.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/cityturn.c?rev=24792r1=24791r2=24792view=diff ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r24793 - /branches/S2_4/client/helpdata.c
Author: jtn Date: Wed Apr 23 22:20:36 2014 New Revision: 24793 URL: http://svn.gna.org/viewcvs/freeciv?rev=24793view=rev Log: Added helptext descriptions for negated requirements. Patch by Emmet Hikory (persia@gna). See gna patch #3841. Modified: branches/S2_4/client/helpdata.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: branches/S2_4/client/helpdata.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_4/client/helpdata.c?rev=24793r1=24792r2=24793view=diff ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r24795 - /trunk/server/maphand.c
Author: cazfi Date: Wed Apr 23 22:46:38 2014 New Revision: 24795 URL: http://svn.gna.org/viewcvs/freeciv?rev=24795view=rev Log: Fixed a division by zero when player without any cities gains a tech. See bug #21946 Modified: trunk/server/maphand.c Modified: trunk/server/maphand.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/maphand.c?rev=24795r1=24794r2=24795view=diff == --- trunk/server/maphand.c (original) +++ trunk/server/maphand.c Wed Apr 23 22:46:38 2014 @@ -256,6 +256,7 @@ int cities_upgradet = 0; struct extra_type *upgradet = NULL; bool multiple_types = FALSE; + int cities_total = city_list_size(pplayer-cities); int percent; conn_list_do_buffer(pplayer-connections); @@ -279,7 +280,11 @@ } } city_list_iterate_end; - percent = cities_upgradet * 100 / city_list_size(pplayer-cities); + if (cities_total 0) { +percent = cities_upgradet * 100 / cities_total; + } else { +percent = 0; + } if (cities_upgradet 0) { if (discovery) { ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r24796 - /branches/S2_5/server/maphand.c
Author: cazfi Date: Wed Apr 23 22:46:43 2014 New Revision: 24796 URL: http://svn.gna.org/viewcvs/freeciv?rev=24796view=rev Log: Fixed a division by zero when player without any cities gains a tech. See bug #21946 Modified: branches/S2_5/server/maphand.c Modified: branches/S2_5/server/maphand.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/maphand.c?rev=24796r1=24795r2=24796view=diff == --- branches/S2_5/server/maphand.c (original) +++ branches/S2_5/server/maphand.c Wed Apr 23 22:46:43 2014 @@ -255,6 +255,7 @@ int cities_upgradet = 0; struct road_type *upgradet = NULL; bool multiple_types = FALSE; + int cities_total = city_list_size(pplayer-cities); int percent; conn_list_do_buffer(pplayer-connections); @@ -278,7 +279,11 @@ } } city_list_iterate_end; - percent = cities_upgradet * 100 / city_list_size(pplayer-cities); + if (cities_total 0) { +percent = cities_upgradet * 100 / cities_total; + } else { +percent = 0; + } if (cities_upgradet 0) { if (discovery) { @@ -355,6 +360,7 @@ int cities_upgradet = 0; struct base_type *upgradet = NULL; bool multiple_types = FALSE; + int cities_total = city_list_size(pplayer-cities); int percent; conn_list_do_buffer(pplayer-connections); @@ -378,7 +384,11 @@ } } city_list_iterate_end; - percent = cities_upgradet * 100 / city_list_size(pplayer-cities); + if (cities_total 0) { +percent = cities_upgradet * 100 / cities_total; + } else { +percent = 0; + } if (cities_upgradet 0) { if (discovery) { ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r24797 - /trunk/data/civ2civ3/game.ruleset
Author: cazfi Date: Wed Apr 23 22:52:18 2014 New Revision: 24797 URL: http://svn.gna.org/viewcvs/freeciv?rev=24797view=rev Log: Balanced civ2civ3 ruleset disasters. Patch by David Fernandez bardo See patch #4637 Modified: trunk/data/civ2civ3/game.ruleset Modified: trunk/data/civ2civ3/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/game.ruleset?rev=24797r1=24796r2=24797view=diff == --- trunk/data/civ2civ3/game.ruleset(original) +++ trunk/data/civ2civ3/game.rulesetWed Apr 23 22:52:18 2014 @@ -370,18 +370,30 @@ [disaster_earthquake] name = _(Earthquake) -frequency = 10 -effects= DestroyBuilding, EmptyProdStock +reqs = +{ type, name, range + Terrain, Hills, Local +} +frequency = 100 +effects= EmptyProdStock [disaster_flood] name = _(Flood) -frequency = 10 -effects= ReducePopulation, EmptyFoodStock +reqs = +{ type, name, range + Extra, River, Adjacent +} +frequency = 100 +effects= EmptyFoodStock [disaster_fire] name = _(Fire) -frequency = 10 -effects= DestroyBuilding, Pollution +reqs = +{ type, name, range + MinSize, 8, City +} +frequency = 100 +effects= DestroyBuilding [disaster_nuclear_accident] name = _(Nuclear Accident) @@ -389,7 +401,7 @@ { type, name, range Building, Nuclear Plant, City } -frequency = 10 +frequency = 100 effects= ReducePopulation, Fallout ; /* -- avoid gettext warnings ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r24798 - /branches/S2_5/data/civ2civ3/game.ruleset
Author: cazfi Date: Wed Apr 23 22:52:28 2014 New Revision: 24798 URL: http://svn.gna.org/viewcvs/freeciv?rev=24798view=rev Log: Balanced civ2civ3 ruleset disasters. Patch by David Fernandez bardo See patch #4637 Modified: branches/S2_5/data/civ2civ3/game.ruleset Modified: branches/S2_5/data/civ2civ3/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2civ3/game.ruleset?rev=24798r1=24797r2=24798view=diff == --- branches/S2_5/data/civ2civ3/game.ruleset(original) +++ branches/S2_5/data/civ2civ3/game.rulesetWed Apr 23 22:52:28 2014 @@ -247,18 +247,30 @@ [disaster_earthquake] name = _(Earthquake) -frequency = 10 -effects= DestroyBuilding, EmptyProdStock +reqs = +{ type, name, range + Terrain, Hills, Local +} +frequency = 100 +effects= EmptyProdStock [disaster_flood] name = _(Flood) -frequency = 10 -effects= ReducePopulation, EmptyFoodStock +reqs = +{ type, name, range + Road, River, Adjacent +} +frequency = 100 +effects= EmptyFoodStock [disaster_fire] name = _(Fire) -frequency = 10 -effects= DestroyBuilding, Pollution +reqs = +{ type, name, range + MinSize, 8, City +} +frequency = 100 +effects= DestroyBuilding [disaster_nuclear_accident] name = _(Nuclear Accident) @@ -266,7 +278,7 @@ { type, name, range Building, Nuclear Plant, City } -frequency = 10 +frequency = 100 effects= ReducePopulation, Fallout ; ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits