Author: sveinung
Date: Sun Oct 18 19:34:21 2015
New Revision: 30127

URL: http://svn.gna.org/viewcvs/freeciv?rev=30127&view=rev
Log:
It's not just diplomats that wants input

The packet unit_actor_wants_input is sent when an actor unit can trigger an
action selection dialog pop up. It isn't limited to diplomats any more.
Rename it to unit_actor_wants_input.

Note that this changes the JSON protocol. It doesn't change the binary
protocol. The binary protocol doesn't care about packet name.

See patch #6436

Modified:
    trunk/client/packhand.c
    trunk/common/packets.def
    trunk/server/unithand.c
    trunk/server/unittools.c

Modified: trunk/client/packhand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/packhand.c?rev=30127&r1=30126&r2=30127&view=diff
==============================================================================
--- trunk/client/packhand.c     (original)
+++ trunk/client/packhand.c     Sun Oct 18 19:34:21 2015
@@ -4105,8 +4105,8 @@
 /**************************************************************************
   Handle request for user input on what diplomat action to do.
 **************************************************************************/
-void handle_unit_diplomat_wants_input(int diplomat_id, int target_tile_id,
-                                      bool is_arrival)
+void handle_unit_actor_wants_input(int diplomat_id, int target_tile_id,
+                                   bool is_arrival)
 {
   struct unit *pdiplomat = player_unit_by_number(client_player(),
                                                      diplomat_id);

Modified: trunk/common/packets.def
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/packets.def?rev=30127&r1=30126&r2=30127&view=diff
==============================================================================
--- trunk/common/packets.def    (original)
+++ trunk/common/packets.def    Sun Oct 18 19:34:21 2015
@@ -1032,7 +1032,7 @@
   GEN_ACTION action_type;
 end
 
-PACKET_UNIT_DIPLOMAT_WANTS_INPUT = 86; sc, dsend, lsend
+PACKET_UNIT_ACTOR_WANTS_INPUT = 86; sc, dsend, lsend
   UNIT diplomat_id;
   TILE target_tile_id;
 

Modified: trunk/server/unithand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/unithand.c?rev=30127&r1=30126&r2=30127&view=diff
==============================================================================
--- trunk/server/unithand.c     (original)
+++ trunk/server/unithand.c     Sun Oct 18 19:34:21 2015
@@ -3003,10 +3003,10 @@
          * end of the function.) */
         send_unit_info(player_reply_dest(pplayer), punit);
 
-        dlsend_packet_unit_diplomat_wants_input(player_reply_dest(pplayer),
-                                                punit->id,
-                                                pdesttile->index,
-                                                FALSE);
+        dlsend_packet_unit_actor_wants_input(player_reply_dest(pplayer),
+                                             punit->id,
+                                             pdesttile->index,
+                                             FALSE);
         return FALSE;
       } else if (!may_non_act_move(punit, pcity, pdesttile, igzoc)) {
         /* No action can be done. No regular move can be done. Attack isn't

Modified: trunk/server/unittools.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/unittools.c?rev=30127&r1=30126&r2=30127&view=diff
==============================================================================
--- trunk/server/unittools.c    (original)
+++ trunk/server/unittools.c    Sun Oct 18 19:34:21 2015
@@ -3706,7 +3706,7 @@
       if (action_tgt_city(act_unit, pdesttile, FALSE)) {
         /* There is a valid target. */
 
-        dlsend_packet_unit_diplomat_wants_input(
+        dlsend_packet_unit_actor_wants_input(
               player_reply_dest(act_player), act_unit->id,
               pdesttile->index, TRUE);
       }


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

Reply via email to