--- freeciv/common/capstr.c Mon Oct 18 13:54:28 1999 +++ freeciv-b/common/capstr.c Thu Oct 28 15:07:00 1999 @@ -68,7 +68,7 @@ * are not directly related to the capability strings discussed here.) */ -#define CAPABILITY "+1.9" +#define CAPABILITY "+1.9 waste" /* "+1.9" is protocol for 1.9.0 stable release */ --- freeciv/common/city.h Sat Oct 2 12:47:04 1999 +++ freeciv-b/common/city.h Thu Oct 28 13:17:50 1999 @@ -157,7 +157,7 @@ /* the productions */ int food_prod, food_surplus; - int shield_prod, shield_surplus; + int shield_prod, waste, shield_surplus; int trade_prod, corruption, tile_trade; int shield_bonus, tax_bonus, science_bonus; /* more CPU savings! */ --- freeciv/common/packets.h Sat Oct 2 12:47:05 1999 +++ freeciv-b/common/packets.h Thu Oct 28 13:49:01 1999 @@ -287,7 +287,7 @@ int ppl_happy, ppl_content, ppl_unhappy; int ppl_elvis, ppl_scientist, ppl_taxman; int food_prod, food_surplus; - int shield_prod, shield_surplus; + int shield_prod, shield_surplus, waste; int trade_prod, corruption; int trade[4],trade_value[4]; int luxury_total, tax_total, science_total; --- freeciv/common/packets.c Sat Oct 2 12:47:05 1999 +++ freeciv-b/common/packets.c Thu Oct 28 13:51:15 1999 @@ -1575,6 +1577,7 @@ cptr=put_uint8(cptr, req->food_surplus); cptr=put_uint16(cptr, req->shield_prod); cptr=put_uint16(cptr, req->shield_surplus); + cptr=put_uint16(cptr, req->waste); cptr=put_uint16(cptr, req->trade_prod); cptr=put_uint16(cptr, req->corruption); @@ -1647,6 +1650,7 @@ iget_uint16(&iter, &packet->shield_prod); iget_uint16(&iter, &packet->shield_surplus); if(packet->shield_surplus > 32767) packet->shield_surplus-=65536; + iget_uint16(&iter, &packet->waste); iget_uint16(&iter, &packet->trade_prod); iget_uint16(&iter, &packet->corruption); --- freeciv/server/cityhand.c Tue Oct 5 12:46:12 1999 +++ freeciv-b/server/cityhand.c Thu Oct 28 13:47:49 1999 @@ -175,6 +175,7 @@ pcity->ai.workremain = 1; /* there's always work to be done! */ pcity->ai.danger = -1; /* flag, may come in handy later */ pcity->corruption = 0; + pcity->waste = 0; pcity->shield_bonus = 100; pcity->tax_bonus = 100; pcity->science_bonus = 100; @@ -655,6 +656,7 @@ packet.food_surplus=pcity->food_surplus; packet.shield_prod=pcity->shield_prod; packet.shield_surplus=pcity->shield_surplus; + packet.waste=pcity->waste; packet.trade_prod=pcity->trade_prod; packet.corruption=pcity->corruption; --- freeciv/server/cityturn.c Fri Oct 8 12:45:45 1999 +++ freeciv-b/server/cityturn.c Thu Oct 28 14:52:00 1999 @@ -345,6 +345,7 @@ pcity->food_surplus=0; pcity->shield_surplus=0; pcity->corruption=0; + pcity->waste=0; city_map_iterate(x, y) { if(get_worker_city(pcity, x, y)==C_TILE_WORKER) { @@ -362,9 +363,12 @@ pcity->trade_prod+=pcity->trade_value[i]; } pcity->corruption = city_corruption(pcity, pcity->trade_prod); + if( game.civstyle == 2) + pcity->waste = city_corruption(pcity, pcity->shield_prod); pcity->ai.trade_want = 8 - city_corruption(pcity, 8); /* AI would calculate this 1000 times otherwise; better to do it once -- Syela */ pcity->trade_prod -= pcity->corruption; + pcity->shield_prod -= pcity->waste; } /************************************************************************** --- freeciv/server/stdinhand.c Tue Oct 5 12:46:15 1999 +++ freeciv-b/server/stdinhand.c Thu Oct 28 14:53:34 1999 @@ -420,9 +420,19 @@ " - Civ2 allows the player to pick which improvement to pillage.\n" " - In Civ2, cities cannot be built next to each other.\n" " - In Civ2, overflight of a hut causes it to disappear.\n" + " - In Civ2, shield production is wasted because of corruption\n" " See also README.rulesets and the techs, units, buildings and terrain\n" " options.") }, /* Flexible rules: these can be changed after the game has started. * Should such flexible rules exist? diplchance is included here * to duplicate its previous behaviour (and note diplchance is only used --- freeciv/client/packhand.c Sun Oct 17 15:08:53 1999 +++ freeciv-b/client/packhand.c Thu Oct 28 13:53:32 1999 @@ -205,6 +205,7 @@ pcity->food_surplus=packet->food_surplus; pcity->shield_prod=packet->shield_prod; pcity->shield_surplus=packet->shield_surplus; + pcity->waste=packet->waste; pcity->trade_prod=packet->trade_prod; pcity->corruption=packet->corruption; --- freeciv/client/gui-gtk/cityrep.c Fri Oct 8 12:45:27 1999 +++ freeciv-b/client/gui-gtk/cityrep.c Thu Oct 28 14:03:06 1999 @@ -185,6 +185,13 @@ return buf; } +static char *cr_entry_waste(struct city *pcity) +{ + static char buf[8]; + sprintf(buf,"%3d", pcity->waste); + return buf; +} + /* City report options (which columns get shown) * To add a new entry, you should just have to: * - add a function like those above @@ -240,6 +247,8 @@ FUNC_TAG(pollution) }, { 0, -3, 1, "", N_("Cor"), N_("Corruption"), FUNC_TAG(corruption) }, + { 0, -5, 1, "", N_("Waste"), N_("Waste"), + FUNC_TAG(waste) }, { 1, 0, 1, N_("Currently Building"), N_("(Stock,Target,Buy Cost)"), N_("Currently Building"), FUNC_TAG(building) } --- freeciv/client/gui-xaw/cityrep.c Fri Oct 8 12:45:29 1999 +++ freeciv-b/client/gui-xaw/cityrep.c Thu Oct 28 14:05:11 1999 @@ -205,6 +205,13 @@ return buf; } +static char *cr_entry_waste(struct city *pcity) +{ + static char buf[8]; + sprintf(buf,"%3d", pcity->waste); + return buf; +} + /* City report options (which columns get shown) * To add a new entry, you should just have to: * - add a function like those above @@ -264,6 +271,8 @@ FUNC_TAG(pollution) }, { 0, 3, 1, "", N_("Cor"), N_("Corruption"), FUNC_TAG(corruption) }, + { 0, 5, 1, "", N_("Waste"), N_("Waste"), + FUNC_TAG(waste) }, { 1, 0, 1, N_("Currently Building"), N_("(Stock,Target,Buy Cost)"), N_("Currently Building"), FUNC_TAG(building) } --- freeciv/client/gui-gtk/citydlg.c Mon Oct 11 10:55:15 1999 +++ freeciv-b/client/gui-gtk/citydlg.c Thu Oct 28 14:50:26 1999 @@ -969,7 +969,7 @@ sprintf(buf, _("Food: %2d (%+2d)\nProd: %2d (%+2d)\nTrade: %2d (%+2d)"), pcity->food_prod, pcity->food_surplus, - pcity->shield_prod, pcity->shield_surplus, + pcity->shield_prod+pcity->waste, pcity->shield_surplus, pcity->trade_prod+pcity->corruption, pcity->trade_prod); gtk_set_label(pdialog->production_label, buf); --- freeciv/client/gui-xaw/citydlg.c Sun Oct 17 15:08:53 1999 +++ freeciv-b/client/gui-xaw/citydlg.c Thu Oct 28 14:57:35 1999 @@ -239,7 +239,7 @@ pcity=pdialog->pcity; foodprod=pcity->food_prod; foodsurplus=pcity->food_surplus; - shieldprod=pcity->shield_prod; + shieldprod=pcity->shield_prod+pcity->waste; shieldsurplus=pcity->shield_surplus; tradeprod=pcity->trade_prod+pcity->corruption; tradesurplus=pcity->trade_prod;