[Freeciv-Dev] (PR#6624) Disband city cleanup
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] (PR#6624) Disband city cleanup |
From: |
"Per I. Mathisen" <per@xxxxxxxxxxx> |
Date: |
Fri, 24 Oct 2003 05:55:46 -0700 |
Reply-to: |
rt@xxxxxxxxxxxxxx |
This cleans up the disband_city() function. The text message was
misleading, and I strongly disliked the "save our units" behaviour, which
teleported all supported units off the map and into our closest
neighbouring city.
- Per
Index: server/cityturn.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/cityturn.c,v
retrieving revision 1.230
diff -u -r1.230 cityturn.c
--- server/cityturn.c 2003/10/13 07:10:15 1.230
+++ server/cityturn.c 2003/10/24 12:51:39
@@ -1371,7 +1371,7 @@
}
/**************************************************************************
- Disband a city into the built unit, supported by the closest city.
+ Disband a city into the built unit, supported by the closest city.
**************************************************************************/
static bool disband_city(struct city *pcity)
{
@@ -1385,21 +1385,13 @@
if (!rcity) {
/* What should we do when we try to disband our only city? */
notify_player_ex(pplayer, x, y, E_CITY_CANTBUILD,
- _("Game: %s can't build %s yet, "
- "and we can't disband our only city."),
- pcity->name, unit_name(pcity->currently_building));
+ _("Game: We can't disband our only city."));
return FALSE;
}
(void) create_unit(pplayer, x, y, pcity->currently_building,
do_make_unit_veteran(pcity, pcity->currently_building),
pcity->id, -1);
-
- /* Shift all the units supported by pcity (including the new unit)
- * to rcity. transfer_city_units does not make sure no units are
- * left floating without a transport, but since all units are
- * transferred this is not a problem. */
- transfer_city_units(pplayer, pplayer, &pcity->units_supported, rcity, pcity,
-1, TRUE);
notify_player_ex(pplayer, x, y, E_UNIT_BUILD,
_("Game: %s is disbanded into %s."),
- [Freeciv-Dev] (PR#6624) Disband city cleanup,
Per I. Mathisen <=
|
|