Author: sveinung
Date: Fri Apr  1 12:14:57 2016
New Revision: 32289

URL: http://svn.gna.org/viewcvs/freeciv?rev=32289&view=rev
Log:
Optional unit action decision wanted marker.

Make it possible to put a graphical representation on a unit to indicate
that it wants an action decision. The symbol is only shown for passive
action decisions if the client configuration has set popup_actor_arrival.

Requested by Jacob Nevins <jtn>

See patch #7049

Modified:
    trunk/client/tilespec.c

Modified: trunk/client/tilespec.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/tilespec.c?rev=32289&r1=32288&r2=32289&view=diff
==============================================================================
--- trunk/client/tilespec.c     (original)
+++ trunk/client/tilespec.c     Fri Apr  1 12:14:57 2016
@@ -279,6 +279,7 @@
       *patrol,
       *convert,
       *battlegroup[MAX_NUM_BATTLEGROUPS],
+      *action_decision_want,
       *lowfuel,
       *tired;
   } unit;
@@ -2761,6 +2762,8 @@
   SET_SPRITE(unit.lowfuel, "unit.lowfuel");
   SET_SPRITE(unit.tired, "unit.tired");
 
+  SET_SPRITE_OPT(unit.action_decision_want, "unit.action_decision_want");
+
   for(i=0; i<NUM_TILES_HP_BAR; i++) {
     fc_snprintf(buffer, sizeof(buffer), "unit.hp_%d", i*10);
     SET_SPRITE(unit.hp_bar[i], buffer);
@@ -4068,6 +4071,11 @@
     }
   }
 
+  if (t->sprites.unit.action_decision_want != NULL
+      && should_ask_server_for_actions(punit)) {
+    ADD_SPRITE_FULL(t->sprites.unit.action_decision_want);
+  }
+
   if (punit->battlegroup != BATTLEGROUP_NONE) {
     ADD_SPRITE_FULL(t->sprites.unit.battlegroup[punit->battlegroup]);
   }


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

Reply via email to