Index: common/game.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/game.c,v retrieving revision 1.94 diff -u -r1.94 game.c --- game.c 2001/01/04 00:49:04 1.94 +++ game.c 2001/02/04 15:17:07 @@ -744,6 +744,7 @@ game.freecost = GAME_DEFAULT_FREECOST; game.conquercost = GAME_DEFAULT_CONQUERCOST; game.settlers = GAME_DEFAULT_SETTLERS; + game.pollution = GAME_DEFAULT_POLLUTION; game.explorer = GAME_DEFAULT_EXPLORER; game.dispersion = GAME_DEFAULT_DISPERSION; game.cityfactor = GAME_DEFAULT_CITYFACTOR; Index: common/game.h =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/game.h,v retrieving revision 1.76 diff -u -r1.76 game.h --- game.h 2001/01/22 04:57:14 1.76 +++ game.h 2001/02/04 15:17:07 @@ -55,6 +55,7 @@ int civstyle; int gold; int settlers, explorer; + int pollution; int dispersion; int tech; int skill_level; @@ -237,6 +238,11 @@ #define GAME_DEFAULT_SETTLERS 2 #define GAME_MIN_SETTLERS 1 #define GAME_MAX_SETTLERS 10 + +#define GAME_DEFAULT_POLLUTION 1 +#define GAME_MIN_POLLUTION 0 +#define GAME_MAX_POLLUTION 1 + #define GAME_DEFAULT_EXPLORER 1 #define GAME_MIN_EXPLORER 0 Index: server/cityturn.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/cityturn.c,v retrieving revision 1.138 diff -u -r1.138 cityturn.c --- cityturn.c 2001/02/03 19:45:50 1.138 +++ cityturn.c 2001/02/04 15:21:24 @@ -319,23 +319,31 @@ **************************************************************************/ static void set_pollution(struct city *pcity) { - int poppul=0; - struct player *pplayer=&game.players[pcity->owner]; - pcity->pollution=pcity->shield_prod; - if (city_got_building(pcity, B_RECYCLING)) - pcity->pollution/=3; - else if (city_got_building(pcity, B_HYDRO) || - city_affected_by_wonder(pcity, B_HOOVER) || - city_got_building(pcity, B_NUCLEAR)) - pcity->pollution/=2; + if(game.pollution) + { + int poppul=0; + struct player *pplayer=&game.players[pcity->owner]; + pcity->pollution=pcity->shield_prod; + if (city_got_building(pcity, B_RECYCLING)) + pcity->pollution/=3; + else if (city_got_building(pcity, B_HYDRO) || + city_affected_by_wonder(pcity, B_HOOVER) || + city_got_building(pcity, B_NUCLEAR)) + pcity->pollution/=2; - if (!city_got_building(pcity, B_MASS)) { - int mod = player_knows_techs_with_flag(pplayer, TF_POPULATION_POLLUTION_INC); - /* was: A_INDUSTRIALIZATION, A_AUTOMOBILE, A_MASS, A_PLASTICS */ - poppul=(pcity->size*mod)/4; - pcity->pollution+=poppul; + if (!city_got_building(pcity, B_MASS)) + { + int mod = player_knows_techs_with_flag(pplayer, TF_POPULATION_POLLUTION_INC); + /* was: A_INDUSTRIALIZATION, A_AUTOMOBILE, A_MASS, A_PLASTICS */ + poppul=(pcity->size*mod)/4; + pcity->pollution+=poppul; + } } - + else + { + pcity->pollution=0; + } + pcity->pollution=MAX(0, pcity->pollution-20); } Index: server/stdinhand.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/stdinhand.c,v retrieving revision 1.172 diff -u -r1.172 stdinhand.c --- stdinhand.c 2001/01/20 02:07:52 1.172 +++ stdinhand.c 2001/02/04 15:21:40 @@ -276,6 +276,12 @@ SSET_GAME_INIT, SSET_TO_CLIENT, GAME_MIN_SETTLERS, GAME_MAX_SETTLERS, GAME_DEFAULT_SETTLERS, N_("Number of initial settlers per player"), "" }, + + { "pollution", &game.pollution, NULL, NULL, + SSET_GAME_INIT, SSET_TO_CLIENT, + GAME_MIN_POLLUTION, GAME_MAX_POLLUTION, GAME_DEFAULT_POLLUTION, + N_("Wether there is pollution in the game"), "" }, + { "explorer", &game.explorer, NULL, NULL, SSET_GAME_INIT, SSET_TO_CLIENT,