diff -r -u ../freeciv_cvs/client/gui-mui/citydlg.c ./client/gui-mui/citydlg.c --- ../freeciv_cvs/client/gui-mui/citydlg.c Wed Jan 5 06:39:24 2000 +++ ./client/gui-mui/citydlg.c Tue Jan 25 17:27:37 2000 @@ -446,37 +446,6 @@ } /************************************************************************** - Calculates the turns which are needed to build the requested - type in the city. GUI Independend -**************************************************************************/ -int city_turns_to_build(struct city *pcity, int id, int id_is_unit) -{ - if (pcity->shield_surplus > 0) - { - int rounds, cost; - int shield_stock = pcity->shield_stock; - - if (id_is_unit) - { - if (!pcity->is_building_unit) - shield_stock /= 2; - cost = get_unit_type(id)->build_cost; - } - else - { - if (pcity->is_building_unit || (is_wonder(pcity->currently_building) != is_wonder(id))) - shield_stock /= 2; - cost = get_improvement_type(id)->build_cost; - } - - rounds = (cost - shield_stock + pcity->shield_surplus - 1) / pcity->shield_surplus; - - return (rounds > 0) ? rounds : 0; - } - return 999; -} - -/************************************************************************** Display function for the listview in the production window **************************************************************************/ __asm __saveds static int city_prod_display(register __a0 struct Hook *h, register __a2 char **array, register __a1 ULONG which) diff -r -u ../freeciv_cvs/common/city.c ./common/city.c --- ../freeciv_cvs/common/city.c Sat Jan 22 21:33:08 2000 +++ ./common/city.c Tue Jan 25 17:27:08 2000 @@ -1170,6 +1170,9 @@ **************************************************************************/ int city_turns_to_build(struct city *pcity, int id, int id_is_unit) { + if(pcity->shield_surplus==0 && !city_unhappy(pcity)) + pcity->shield_surplus=1; + if (pcity->shield_surplus > 0) { int rounds, cost; Only in .: turns_to_build.diff