Author: sveinung
Date: Sat Aug 15 23:46:21 2015
New Revision: 29539

URL: http://svn.gna.org/viewcvs/freeciv?rev=29539&view=rev
Log:
Notify when transferring a unique unit is illegal

Split from bug #23758 because of the 2.5.1 string freeze
as advised by Marko Lindqvist <cazfi>

See patch #6210

Modified:
    branches/S2_5/server/citytools.c
    branches/S2_5/server/diplomats.c
    branches/S2_5/server/unithand.c

Modified: branches/S2_5/server/citytools.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/citytools.c?rev=29539&r1=29538&r2=29539&view=diff
==============================================================================
--- branches/S2_5/server/citytools.c    (original)
+++ branches/S2_5/server/citytools.c    Sat Aug 15 23:46:21 2015
@@ -615,6 +615,15 @@
         bounce_unit(punit, verbose);
       } else {
         /* Kill the unique unit. */
+
+        if (verbose) {
+          notify_player(from_player, unit_tile(punit),
+                        E_UNIT_LOST_MISC, ftc_server,
+                        /* TRANS: Americans ... Leader */
+                        _("The %s already have a %s. Can't transfer yours."),
+                        nation_plural_for_player(to_player),
+                        unit_tile_link(punit));
+        }
 
         wipe_unit(punit, ULR_CITY_LOST, NULL);
       }

Modified: branches/S2_5/server/diplomats.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/diplomats.c?rev=29539&r1=29538&r2=29539&view=diff
==============================================================================
--- branches/S2_5/server/diplomats.c    (original)
+++ branches/S2_5/server/diplomats.c    Sat Aug 15 23:46:21 2015
@@ -440,6 +440,11 @@
   if (utype_player_already_has_this_unique(pplayer,
                                            unit_type(pvictim))) {
     log_debug("bribe-unit: already got unique unit");
+    notify_player(pplayer, unit_tile(pdiplomat),
+                  E_MY_DIPLOMAT_FAILED, ftc_server,
+                  /* TRANS: You already have a Leader. */
+                  _("You already have a %s."),
+                  unit_link(pvictim));
 
     return;
   }

Modified: branches/S2_5/server/unithand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/unithand.c?rev=29539&r1=29538&r2=29539&view=diff
==============================================================================
--- branches/S2_5/server/unithand.c     (original)
+++ branches/S2_5/server/unithand.c     Sat Aug 15 23:46:21 2015
@@ -1515,6 +1515,10 @@
 
         if (!capture_possible) {
           log_debug("capture units: already got unique unit");
+          notify_player(pplayer, pdesttile, E_MY_DIPLOMAT_FAILED, ftc_server,
+                        /* TRANS: You can only have one Leader. */
+                        _("You can only have one %s."),
+                        unit_link(to_capture));
 
           break;
         }


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

Reply via email to