Author: jtn
Date: Mon Aug 15 23:45:25 2016
New Revision: 33598

URL: http://svn.gna.org/viewcvs/freeciv?rev=33598&view=rev
Log:
Make Output_Waste_By_Rel_Distance work in the absence of
Output_Waste_By_Distance, and mention it in government help.

See gna bug #24966.

Modified:
    trunk/client/helpdata.c
    trunk/common/city.c

Modified: trunk/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/helpdata.c?rev=33598&r1=33597&r2=33598&view=diff
==============================================================================
--- trunk/client/helpdata.c     (original)
+++ trunk/client/helpdata.c     Mon Aug 15 23:45:25 2016
@@ -5829,6 +5829,12 @@
           }
         }
         break;
+      case EFT_OUTPUT_WASTE_BY_REL_DISTANCE:
+        /* Semi-arbitrary scaling to get likely ruleset values in roughly
+         * the same range as WASTE_BY_DISTANCE */
+        /* FIXME: use different wording? */
+        net_value = (net_value + 39) / 40; /* round up */
+        /* fall through to: */
       case EFT_OUTPUT_WASTE_BY_DISTANCE:
         if (world_value_valid) {
           if (net_value >= 3) {

Modified: trunk/common/city.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/city.c?rev=33598&r1=33597&r2=33598&view=diff
==============================================================================
--- trunk/common/city.c (original)
+++ trunk/common/city.c Mon Aug 15 23:45:25 2016
@@ -3049,7 +3049,7 @@
                                               EFT_OUTPUT_WASTE_BY_DISTANCE);
     int waste_by_rel_dist = get_city_output_bonus(pcity, 
get_output_type(otype),
                                                   
EFT_OUTPUT_WASTE_BY_REL_DISTANCE);
-    if (waste_by_dist > 0) {
+    if (waste_by_dist > 0 || waste_by_rel_dist > 0) {
       const struct city *gov_center = NULL;
       int min_dist = FC_INFINITY;
 


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to