Index: data/helpdata.txt =================================================================== RCS file: /home/freeciv/CVS/freeciv/data/helpdata.txt,v retrieving revision 1.70 diff -u -r1.70 helpdata.txt @@ -823,7 +823,10 @@ %% Allows a city to grow beyond size 12. --- # Solar Plant -This improvement has not been implemented. +Eliminates pollution generated from production in a city. It also +increases the shield production of a Factory or Mfg. Plant in the +city. Together with a Hydro/Power/Nuclear plant this means a 200% +production bonus. --- # Space Component Space Components can be differentiated into Propulsion and Fuel Index: server/citytools.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/citytools.c,v retrieving revision 1.46 diff -u -r1.46 citytools.c --- citytools.c 1999/07/14 11:07:03 1.46 +++ citytools.c 1999/07/20 06:10:30 @@ -400,6 +400,10 @@ if (can_build_improvement(pcity, B_POWER)) values[B_POWER]=pcity->shield_prod*100; + + /* I didn't really know how this worked when I added this */ + if (can_build_improvement(pcity, B_SOLAR)) + values[B_SOLAR]=pcity->shield_prod*100+pcity->pollution*125; } if (can_build_improvement(pcity, B_MFG)) @@ -473,6 +477,8 @@ int set_city_shield_bonus(struct city *pcity) { int tmp = 0; + double mul = 1.0; + if (city_got_building(pcity, B_FACTORY)) { if (city_got_building(pcity, B_MFG)) tmp = 100; @@ -482,8 +488,10 @@ if (city_affected_by_wonder(pcity, B_HOOVER) || city_got_building(pcity, B_POWER) || city_got_building(pcity, B_HYDRO) || - city_got_building(pcity,B_NUCLEAR)) - tmp *= 1.5; + city_got_building(pcity,B_NUCLEAR)) mul += 0.5; + if (city_got_building(pcity, B_SOLAR)) mul += 0.5; + + tmp *= mul; } pcity->shield_bonus = tmp + 100; Index: server/cityturn.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/cityturn.c,v retrieving revision 1.63 diff -u -r1.63 cityturn.c --- cityturn.c 1999/07/14 11:07:03 1.63 +++ cityturn.c 1999/07/20 06:10:31 @@ -312,12 +312,16 @@ 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_SOLAR)) + pcity->pollution=0; + else { + if (city_got_building(pcity, B_RECYCLING)) + pcity->pollution/=3; + 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)) { if (get_invention(pplayer, A_INDUSTRIALIZATION)==TECH_KNOWN) mod=1; Index: server/civserver.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/civserver.c,v retrieving revision 1.102 diff -u -r1.102 civserver.c --- civserver.c 1999/07/14 11:23:15 1.102 +++ civserver.c 1999/07/20 06:10:32 @@ -762,15 +762,22 @@ **************************************************************************/ static void update_pollution(void) { - int x,y,count=0; + int i,x,y,count=0,solar_plants=0; for (x=0;x