Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2005:
[Freeciv-Dev] (PR#12814) famine message for a city of size 1 is wrong
Home

[Freeciv-Dev] (PR#12814) famine message for a city of size 1 is wrong

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#12814) famine message for a city of size 1 is wrong
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 16 Apr 2005 17:52:24 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12814 >

If a city of size 1 has famine, the city is completely wiped.  But the
message just says "population loss".

-jason

Index: server/cityturn.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/cityturn.c,v
retrieving revision 1.303
diff -u -r1.303 cityturn.c
--- server/cityturn.c   14 Apr 2005 04:49:15 -0000      1.303
+++ server/cityturn.c   17 Apr 2005 00:51:27 -0000
@@ -552,9 +552,14 @@
        return;
       }
     } unit_list_iterate_safe_end;
-    notify_player_ex(city_owner(pcity), pcity->tile, E_CITY_FAMINE,
-                    _("Famine causes population loss in %s."),
-                    pcity->name);
+    if (pcity->size > 1) {
+      notify_player_ex(city_owner(pcity), pcity->tile, E_CITY_FAMINE,
+                      _("Famine causes population loss in %s."),
+                      pcity->name);
+    } else {
+      notify_player_ex(city_owner(pcity), pcity->tile, E_CITY_FAMINE,
+                      _("Famine destroys %s entirely."), pcity->name);
+    }
     pcity->food_stock = (city_granary_size(pcity->size - 1)
                         * granary_savings(pcity)) / 100;
     city_reduce_size(pcity, 1);

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#12814) famine message for a city of size 1 is wrong, Jason Short <=