Author: sveinung
Date: Fri Nov  6 13:39:01 2015
New Revision: 30444

URL: http://svn.gna.org/viewcvs/freeciv?rev=30444&view=rev
Log:
SDL clients: 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:
    branches/S2_6/client/gui-sdl/action_dialog.c
    branches/S2_6/client/gui-sdl2/action_dialog.c

Modified: branches/S2_6/client/gui-sdl/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-sdl/action_dialog.c?rev=30444&r1=30443&r2=30444&view=diff
==============================================================================
--- branches/S2_6/client/gui-sdl/action_dialog.c        (original)
+++ branches/S2_6/client/gui-sdl/action_dialog.c        Fri Nov  6 13:39:01 2015
@@ -755,6 +755,22 @@
   SDL_String16 *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;

Modified: branches/S2_6/client/gui-sdl2/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-sdl2/action_dialog.c?rev=30444&r1=30443&r2=30444&view=diff
==============================================================================
--- branches/S2_6/client/gui-sdl2/action_dialog.c       (original)
+++ branches/S2_6/client/gui-sdl2/action_dialog.c       Fri Nov  6 13:39:01 2015
@@ -758,6 +758,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