Index: data/helpdata.txt =================================================================== RCS file: /home/freeciv/CVS/freeciv/data/helpdata.txt,v retrieving revision 1.70 diff -u -r1.70 helpdata.txt --- helpdata.txt 1999/07/05 20:17:00 1.70 +++ helpdata.txt 1999/07/20 08:39:10 @@ -823,7 +823,12 @@ %% 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. +A solar plant even helps fighting global warming by absorbing some +of the heat radiated from the sun. --- # Space Component Space Components can be differentiated into Propulsion and Fuel Index: data/default/buildings.ruleset =================================================================== RCS file: /home/freeciv/CVS/freeciv/data/default/buildings.ruleset,v retrieving revision 1.3 diff -u -r1.3 buildings.ruleset --- buildings.ruleset 1999/05/14 19:57:23 1.3 +++ buildings.ruleset 1999/07/20 08:39:26 @@ -61,8 +61,8 @@ "SDI Defense", 0, "Laser", 200, 4, 0, "None" "Sewer System", 0, "Sanitation", 120, 2, 0, "None" -;"Solar Plant", 0, "Environmentalism", 320, 4, 0, "None" -"Solar Plant", 0, "Never", 320, 4, 0, "None" +"Solar Plant", 0, "Environmentalism", 320, 4, 0, "None" +;"Solar Plant", 0, "Never", 320, 4, 0, "None" "Space Component", 0, "Plastics", 160, 0, 0, "None" "Space Module", 0, "Superconductors", 320, 0, 0, "None" Index: data/default/techs.ruleset =================================================================== RCS file: /home/freeciv/CVS/freeciv/data/default/techs.ruleset,v retrieving revision 1.1 diff -u -r1.1 techs.ruleset --- techs.ruleset 1999/01/30 02:57:55 1.1 +++ techs.ruleset 1999/07/20 08:39:27 @@ -49,8 +49,8 @@ "Electricity", "Metallurgy", "Magnetism" "Electronics", "The Corporation", "Electricity" "Engineering", "The Wheel", "Construction" -"Environmentalism", "Never", "Never" -; "Environmentalism", "Recycling", "Space Flight" +; "Environmentalism", "Never", "Never" +"Environmentalism", "Recycling", "Space Flight" "Espionage", "Communism", "Democracy" "Explosives", "Gunpowder", "Chemistry" "Feudalism", "Warrior Code", "Monarchy" 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 08:39:58 @@ -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 08:39:58 @@ -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 08:39:59 @@ -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