Author: sveinung
Date: Fri Nov  6 13:34:54 2015
New Revision: 30440

URL: http://svn.gna.org/viewcvs/freeciv?rev=30440&view=rev
Log:
SDL 2 client: just show targeted in act sel dlg

It is possible to do the untargeted variant of Steal Tech and Sabotage City
from the target selection dialog. Don't show the untargeted variant when
the targeted variant is possible. Let the player pick it as a target.

This restores the 2.5 behavior.

See patch #6540

Modified:
    trunk/client/gui-sdl2/action_dialog.c

Modified: trunk/client/gui-sdl2/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl2/action_dialog.c?rev=30440&r1=30439&r2=30440&view=diff
==============================================================================
--- trunk/client/gui-sdl2/action_dialog.c       (original)
+++ trunk/client/gui-sdl2/action_dialog.c       Fri Nov  6 13:34:54 2015
@@ -978,6 +978,22 @@
   utf8_str *pstr;
   const char *ui_name;
 
+  if (act == ACTION_SPY_SABOTAGE_CITY
+      && action_prob_possible(
+        action_probabilities[ACTION_SPY_TARGETED_SABOTAGE_CITY])) {
+    /* The player can select Sabotage City from the target selection dialog
+     * of Targeted Sabotage City. */
+    return;
+  }
+
+  if (act == ACTION_SPY_STEAL_TECH
+      && action_prob_possible(
+        action_probabilities[ACTION_SPY_TARGETED_STEAL_TECH])) {
+    /* The player can select Steal Tech from the target selection dialog of
+     * Targeted Steal Tech. */
+    return;
+  }
+
   /* Don't show disabled actions */
   if (!action_prob_possible(action_probabilities[act])) {
     return;


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

Reply via email to